navid_star
سه شنبه 04 آبان 1389, 12:44 عصر
سلام به همه اساتید و دوستان..
از اونجایی که انجمن رو تکوندمو تمام نوشته ها رو خوندم چیزی دستگیرم نشد ، مجبور به نوشتن تاپیک جدید شدم..:لبخند:
آقا داستان ما از این قراره که فارسی سازی یه اسکریپته ، بدین صورت که تمامی کالکشن های پایگاه داده ( Mysql ) به کالکشن utf8_persian_ci تبدیل شده و داخل پایگاه به راحتی میشه فارسی نوشت..حالا در خود سایت اطلاعات هم به راحتی از پایگاه خونده میشه و فارسی نشون میده.
مشکل اصلی ما صفحه مدیریت این اسکریپته ، بدین صورت که من میام بطور مثال فیلد site_info رو وارد میکنم و عمل update انجام میشه ولی....:ناراحت: اینجاست که بصورت کد شده کلمه مورد نظر من کد میشه و داخل دیتا بیس هم یه چیز دیگه نشون میده...
* نکات :
در header متا تگ های فارسی درج شده ( مشکلی از اون لحاظ نیست )
بعد از کانکشن به دیتا بیس کد utf8 برای بازخوانی درج شده ( کد رو پایین میزارم )
* مثال : در صفحه تنظیمات ( که کد صفحه در زیر آمده ) برای site_info کلمه " سلام " درج میشه و صفحه کلمه رو به " سÙ�اÙ� " تبذیل میکنه و در پایگاه داده " س٠" ذخیره میشه:عصبانی++: عجب سیکلی :گیج:
کد صفحه مدیریت مورد نظر
<?php
$ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(!defined("ADMIN_PROCESS")) { exit(); }
$ref_title = "General Settings";
if($admin_loggedin) {
function filter_data($val) {
return htmlentities($val,ENT_QUOTES);
}
if($_POST && !$gen4demo) {
$post = array_map("filter_data",$_POST);
$post['color_changer'] = ($post['color_changer']) ? "1" : "0";
$post['verification'] = ($post['verification']) ? "1" : "0";
$post['ver_payment'] = ($post['ver_payment']) ? "1" : "0";
$post['cronjob'] = ($post['cronjob']) ? "1" : "0";
$post['disable_reg'] = ($post['disable_reg']) ? "1" : "0";
$post['showstats'] = ($post['showstats']) ? "1" : "0";
$post['underconstruction'] = ($post['underconstruction']) ? "1" : "0";
$post['vacationmode'] = ($post['vacationmode']) ? "1" : "0";
$post['favicon_ico'] = ($post['favicon_ico']) ? "1" : "0";
$post['favicon_gif'] = ($post['favicon_gif']) ? "1" : "0";
$post['secure_admin'] = ($post['secure_admin']) ? "1" : "0";
$post['refund_policy'] = ($post['refund_policy']) ? "1" : "0";
$post['email_change'] = ($post['email_change']) ? "1" : "0";
$post['paymentemail_change'] = ($post['paymentemail_change']) ? "1" : "0";
$ip = $_SERVER['REMOTE_ADDR'];
$ip_number = sprintf("%u", ip2long($ip));
if(date("h:i:s") < $post['crontime']) $post['next_clearup'] = strtotime(date("d-m-Y {$post['crontime']}"));
else $post['next_clearup'] = strtotime(date("d-m-Y {$post['crontime']}")) + 60*60*24;
foreach($post as $k=>$v) {
$v = addslashes($v);
mysql_query("UPDATE settings SET set_value='{$v}' WHERE set_name='{$k}' LIMIT 1;");
$set[$k] = $v;
}
$error = "Settings saved.";
$do->refresh_sess();
}
$adm = ($set['secure_admin']) ? "checked='checked'" : "";
$q = mysql_query("SELECT * FROM users WHERE admin_access='1' LIMIT 1;");
if (mysql_num_rows($q) == '1' ){
$sa .="<div class=\"row2\"><label>Secure Admin Area:</label><input type=\"checkbox\" name=\"secure_admin\" value=\"1\" class=\"check\"{$adm} /> <span>?</span></div>
<div class=\"border\"></div>";
} else {
$sa .="<div class=\"row2\"><label>No <a style='color:red' href='index.php?action=users'>users</a> with admin area access!</label></b> <span>?</span></div>
<div class=\"border\"></div>";
}
if($set['color_changer']) $check = " checked=\"checked\"";
if($set['verification']) $verif = " checked=\"checked\"";
if($set['ver_payment']) $ver_pay = " checked=\"checked\"";
if($set['cronjob']) $croncheck = " checked=\"checked\"";
if($set['disable_reg']) $disablereg = " checked=\"checked\"";
if($set['showstats']) $showcheck = " checked=\"checked\"";
if($set['underconstruction']) $concheck = " checked=\"checked\"";
if($set['vacationmode']) $vacationcheck = " checked=\"checked\"";
if($set['favicon_ico']) $icocheck = " checked=\"checked\"";
if($set['favicon_gif']) $gifcheck = " checked=\"checked\"";
if($set['refund_policy']) $refpolicy = " checked=\"checked\"";
if($set['email_change']) $changemail = " checked=\"checked\"";
if($set['paymentemail_change']) $changepmail = " checked=\"checked\"";
$contents .= "
<div id=\"wrapper\">
<div id=\"alone\" class=\"gensettings box\">
<div id=\"head\">
<div class=\"left\"><img src=\"pre/images/settings.png\" width=\"23\" height=\"23\" alt=\"\" /></div>
<h1>{$ref_title}</h1>
<div class=\"right\"></div>
</div>
<div class=\"items\">";
if($error) $contents .= "
<div class=\"center\">{$error}</div>";
$contents .= "
<form action=\"\" method=\"post\">
{$sa}
<div><label>Site Name:</label> <input type=\"text\" name=\"site_name\" value=\"{$set['site_name']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Page Title:</label> <input type=\"text\" name=\"title\" value=\"{$set['title']}\" /> <span>?</span></div>
<div><label>Site Keywords:</label> <input type=\"text\" name=\"keywords\" value=\"{$set['keywords']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Site Description:</label> <input type=\"text\" name=\"desc\" value=\"{$set['desc']}\" /> <span>?</span></div>
<div><label>Allow Default Theme Color Change:</label> <input type=\"checkbox\" name=\"color_changer\" value=\"1\" class=\"check\"{$check} /> <span>?</span></div>
<div class=\"row2\"><label>Default Theme Color:(Only put existing themes in here)</label> <input type\"text\" name=\"default_color\" value=\"{$set['default_color']}\" /> <span>?</span></div>
<div><label>Logo: (transparant logo, if empty use standard)</label> <input type=\"text\" name=\"logo\" value=\"{$set['logo']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Show Stats In Header:</label> <input type=\"checkbox\" name=\"showstats\" value=\"1\" class=\"check\"{$showcheck} /> <span>?</span></div>
<div><label>Use Favicon.ico (Bookmark Icon):</label> <input type=\"checkbox\" name=\"favicon_ico\" value=\"1\" class=\"check\"{$icocheck} /> <span>?</span></div>
<div class=\"row2\"><label>Use Favicon.gif (Bookmark Icon):</label> <input type=\"checkbox\" name=\"favicon_gif\" value=\"1\" class=\"check\"{$gifcheck} /> <span>?</span></div>
<div class=\"border\"></div>
<div><label>Contact E-Mail:</label> <input type=\"text\" name=\"contact_email\" value=\"{$set['contact_email']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Contact Phone:</label> <input type=\"text\" name=\"contact_phone\" value=\"{$set['contact_phone']}\" /> <span>?</span></div>
<div><label>Contact Address:</label> <input type=\"text\" name=\"contact_address\" value=\"{$set['contact_address']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>No-reply E-Mail:</label> <input type=\"text\" name=\"noreply\" value=\"{$set['noreply']}\" /> <span>?</span></div>
<div><label>Verification Enabled:</label> <input type=\"checkbox\" name=\"verification\" value=\"1\" class=\"check\"{$verif} /> <span>?</span></div>
<div class=\"row2\"><label>Verify Payment E-Mail:</label> <input type=\"checkbox\" name=\"ver_payment\" value=\"1\" class=\"check\"{$ver_pay} /> <span>?</span></div>
<div><label>Allow Users To Change Their Email Address:</label> <input type=\"checkbox\" name=\"email_change\" value=\"1\" class=\"check\"{$changemail} /> <span>?</span></div>
<div class=\"row2\"><label>Allow Users To Change Their Payment Addresses:</label> <input type=\"checkbox\" name=\"paymentemail_change\" value=\"1\" class=\"check\"{$changepmail} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Advertiser Payment Text:</label> <input type=\"text\" name=\"advertiser_paymenttext\" value=\"{$set['advertiser_paymenttext']}\" /> <span>?</span></div>
<div><label>Referral Balance Payment Text:</label> <input type=\"text\" name=\"rbalanceadd_paymenttext\" value=\"{$set['rbalanceadd_paymenttext']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Outside Advertisers Payment Text:</label> <input type=\"text\" name=\"outsideads\" value=\"{$set['outsideads']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Cron Job:</label> <input type=\"checkbox\" name=\"cronjob\" value=\"1\" class=\"check\"{$croncheck} /> <span>?</span></div>
<div><label>Cron Time(refresh time):</label> <input type=\"text\" name=\"crontime\" value=\"{$set['crontime']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Enable Vacation Mode:</label> <input type=\"checkbox\" name=\"vacationmode\" value=\"1\" class=\"check\"{$vacationcheck} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Enable Refund Policy:</label> <input type=\"checkbox\" name=\"refund_policy\" value=\"1\" class=\"check\"{$refpolicy} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Disable Register Page:</label> <input type=\"checkbox\" name=\"disable_reg\" value=\"1\" class=\"check\"{$disablereg} /> <span>?</span></div>
<div><label>Disabled Register Page Header Text:</label> <input type=\"text\" name=\"disabled_reg_headertext\" value=\"{$set['disabled_reg_headertext']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Disabled Register Page Text:</label> <input type=\"text\" name=\"disabled_reg_text\" value=\"{$set['disabled_reg_text']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div><label>Under construction:</label> <input type=\"checkbox\" name=\"underconstruction\" value=\"1\"{$concheck} class=\"check\" /> <span>?</span></div>
<div class=\"row2\"><label>Under construction Page Text:</label> <input type=\"text\" name=\"underconstruction_text\" value=\"{$set['underconstruction_text']}\" /> <span>?</span></div>
<div><label>Under construction ip's:</label> <input type=\"text\" name=\"underconstruction_ip\" value=\"$ip\" /> <span>?</span></div>
<div class='row2'><label>Your Current Ip Address:</label> <input type='text' name=\"{$ip}\" value=\"$ip\"/><span>?</span></div>
<div class=\"border\"></div>
<div class=\"buttons right\"><input type=\"submit\" value=\"Update\" /></div>
</form>
</div>
</div>
</div>";
} else header("Location: index.php");
?>اتصال به دیتا بیس
if(!$c = mysql_connect(DB_HOST, DB_USER, DB_PASS)) {
set_error("We couldn't establish a connection to your MySQL server.");
$error_load = true;
}
if(!mysql_select_db(DB_NAME, $c)) {
set_error("We couldn't establish a connection to your MySQL database.");
$error_load = true;
}
mysql_query("set names 'utf8'");
mysql_query('SET CHARACTER SET utf8;', $c);
mysql_query("SET SESSION collation_connection = 'utf8_persian_ci'", $c); دوستان ممنون میشم منو راهنمایی کنین ، چند روزیه درگیرشم و دیگه آخرین راه این بود که از بچه های برنامه نویس کمک بگیرم:بوس:
از اونجایی که انجمن رو تکوندمو تمام نوشته ها رو خوندم چیزی دستگیرم نشد ، مجبور به نوشتن تاپیک جدید شدم..:لبخند:
آقا داستان ما از این قراره که فارسی سازی یه اسکریپته ، بدین صورت که تمامی کالکشن های پایگاه داده ( Mysql ) به کالکشن utf8_persian_ci تبدیل شده و داخل پایگاه به راحتی میشه فارسی نوشت..حالا در خود سایت اطلاعات هم به راحتی از پایگاه خونده میشه و فارسی نشون میده.
مشکل اصلی ما صفحه مدیریت این اسکریپته ، بدین صورت که من میام بطور مثال فیلد site_info رو وارد میکنم و عمل update انجام میشه ولی....:ناراحت: اینجاست که بصورت کد شده کلمه مورد نظر من کد میشه و داخل دیتا بیس هم یه چیز دیگه نشون میده...
* نکات :
در header متا تگ های فارسی درج شده ( مشکلی از اون لحاظ نیست )
بعد از کانکشن به دیتا بیس کد utf8 برای بازخوانی درج شده ( کد رو پایین میزارم )
* مثال : در صفحه تنظیمات ( که کد صفحه در زیر آمده ) برای site_info کلمه " سلام " درج میشه و صفحه کلمه رو به " سÙ�اÙ� " تبذیل میکنه و در پایگاه داده " س٠" ذخیره میشه:عصبانی++: عجب سیکلی :گیج:
کد صفحه مدیریت مورد نظر
<?php
$ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(!defined("ADMIN_PROCESS")) { exit(); }
$ref_title = "General Settings";
if($admin_loggedin) {
function filter_data($val) {
return htmlentities($val,ENT_QUOTES);
}
if($_POST && !$gen4demo) {
$post = array_map("filter_data",$_POST);
$post['color_changer'] = ($post['color_changer']) ? "1" : "0";
$post['verification'] = ($post['verification']) ? "1" : "0";
$post['ver_payment'] = ($post['ver_payment']) ? "1" : "0";
$post['cronjob'] = ($post['cronjob']) ? "1" : "0";
$post['disable_reg'] = ($post['disable_reg']) ? "1" : "0";
$post['showstats'] = ($post['showstats']) ? "1" : "0";
$post['underconstruction'] = ($post['underconstruction']) ? "1" : "0";
$post['vacationmode'] = ($post['vacationmode']) ? "1" : "0";
$post['favicon_ico'] = ($post['favicon_ico']) ? "1" : "0";
$post['favicon_gif'] = ($post['favicon_gif']) ? "1" : "0";
$post['secure_admin'] = ($post['secure_admin']) ? "1" : "0";
$post['refund_policy'] = ($post['refund_policy']) ? "1" : "0";
$post['email_change'] = ($post['email_change']) ? "1" : "0";
$post['paymentemail_change'] = ($post['paymentemail_change']) ? "1" : "0";
$ip = $_SERVER['REMOTE_ADDR'];
$ip_number = sprintf("%u", ip2long($ip));
if(date("h:i:s") < $post['crontime']) $post['next_clearup'] = strtotime(date("d-m-Y {$post['crontime']}"));
else $post['next_clearup'] = strtotime(date("d-m-Y {$post['crontime']}")) + 60*60*24;
foreach($post as $k=>$v) {
$v = addslashes($v);
mysql_query("UPDATE settings SET set_value='{$v}' WHERE set_name='{$k}' LIMIT 1;");
$set[$k] = $v;
}
$error = "Settings saved.";
$do->refresh_sess();
}
$adm = ($set['secure_admin']) ? "checked='checked'" : "";
$q = mysql_query("SELECT * FROM users WHERE admin_access='1' LIMIT 1;");
if (mysql_num_rows($q) == '1' ){
$sa .="<div class=\"row2\"><label>Secure Admin Area:</label><input type=\"checkbox\" name=\"secure_admin\" value=\"1\" class=\"check\"{$adm} /> <span>?</span></div>
<div class=\"border\"></div>";
} else {
$sa .="<div class=\"row2\"><label>No <a style='color:red' href='index.php?action=users'>users</a> with admin area access!</label></b> <span>?</span></div>
<div class=\"border\"></div>";
}
if($set['color_changer']) $check = " checked=\"checked\"";
if($set['verification']) $verif = " checked=\"checked\"";
if($set['ver_payment']) $ver_pay = " checked=\"checked\"";
if($set['cronjob']) $croncheck = " checked=\"checked\"";
if($set['disable_reg']) $disablereg = " checked=\"checked\"";
if($set['showstats']) $showcheck = " checked=\"checked\"";
if($set['underconstruction']) $concheck = " checked=\"checked\"";
if($set['vacationmode']) $vacationcheck = " checked=\"checked\"";
if($set['favicon_ico']) $icocheck = " checked=\"checked\"";
if($set['favicon_gif']) $gifcheck = " checked=\"checked\"";
if($set['refund_policy']) $refpolicy = " checked=\"checked\"";
if($set['email_change']) $changemail = " checked=\"checked\"";
if($set['paymentemail_change']) $changepmail = " checked=\"checked\"";
$contents .= "
<div id=\"wrapper\">
<div id=\"alone\" class=\"gensettings box\">
<div id=\"head\">
<div class=\"left\"><img src=\"pre/images/settings.png\" width=\"23\" height=\"23\" alt=\"\" /></div>
<h1>{$ref_title}</h1>
<div class=\"right\"></div>
</div>
<div class=\"items\">";
if($error) $contents .= "
<div class=\"center\">{$error}</div>";
$contents .= "
<form action=\"\" method=\"post\">
{$sa}
<div><label>Site Name:</label> <input type=\"text\" name=\"site_name\" value=\"{$set['site_name']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Page Title:</label> <input type=\"text\" name=\"title\" value=\"{$set['title']}\" /> <span>?</span></div>
<div><label>Site Keywords:</label> <input type=\"text\" name=\"keywords\" value=\"{$set['keywords']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Site Description:</label> <input type=\"text\" name=\"desc\" value=\"{$set['desc']}\" /> <span>?</span></div>
<div><label>Allow Default Theme Color Change:</label> <input type=\"checkbox\" name=\"color_changer\" value=\"1\" class=\"check\"{$check} /> <span>?</span></div>
<div class=\"row2\"><label>Default Theme Color:(Only put existing themes in here)</label> <input type\"text\" name=\"default_color\" value=\"{$set['default_color']}\" /> <span>?</span></div>
<div><label>Logo: (transparant logo, if empty use standard)</label> <input type=\"text\" name=\"logo\" value=\"{$set['logo']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Show Stats In Header:</label> <input type=\"checkbox\" name=\"showstats\" value=\"1\" class=\"check\"{$showcheck} /> <span>?</span></div>
<div><label>Use Favicon.ico (Bookmark Icon):</label> <input type=\"checkbox\" name=\"favicon_ico\" value=\"1\" class=\"check\"{$icocheck} /> <span>?</span></div>
<div class=\"row2\"><label>Use Favicon.gif (Bookmark Icon):</label> <input type=\"checkbox\" name=\"favicon_gif\" value=\"1\" class=\"check\"{$gifcheck} /> <span>?</span></div>
<div class=\"border\"></div>
<div><label>Contact E-Mail:</label> <input type=\"text\" name=\"contact_email\" value=\"{$set['contact_email']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Contact Phone:</label> <input type=\"text\" name=\"contact_phone\" value=\"{$set['contact_phone']}\" /> <span>?</span></div>
<div><label>Contact Address:</label> <input type=\"text\" name=\"contact_address\" value=\"{$set['contact_address']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>No-reply E-Mail:</label> <input type=\"text\" name=\"noreply\" value=\"{$set['noreply']}\" /> <span>?</span></div>
<div><label>Verification Enabled:</label> <input type=\"checkbox\" name=\"verification\" value=\"1\" class=\"check\"{$verif} /> <span>?</span></div>
<div class=\"row2\"><label>Verify Payment E-Mail:</label> <input type=\"checkbox\" name=\"ver_payment\" value=\"1\" class=\"check\"{$ver_pay} /> <span>?</span></div>
<div><label>Allow Users To Change Their Email Address:</label> <input type=\"checkbox\" name=\"email_change\" value=\"1\" class=\"check\"{$changemail} /> <span>?</span></div>
<div class=\"row2\"><label>Allow Users To Change Their Payment Addresses:</label> <input type=\"checkbox\" name=\"paymentemail_change\" value=\"1\" class=\"check\"{$changepmail} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Advertiser Payment Text:</label> <input type=\"text\" name=\"advertiser_paymenttext\" value=\"{$set['advertiser_paymenttext']}\" /> <span>?</span></div>
<div><label>Referral Balance Payment Text:</label> <input type=\"text\" name=\"rbalanceadd_paymenttext\" value=\"{$set['rbalanceadd_paymenttext']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Outside Advertisers Payment Text:</label> <input type=\"text\" name=\"outsideads\" value=\"{$set['outsideads']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Cron Job:</label> <input type=\"checkbox\" name=\"cronjob\" value=\"1\" class=\"check\"{$croncheck} /> <span>?</span></div>
<div><label>Cron Time(refresh time):</label> <input type=\"text\" name=\"crontime\" value=\"{$set['crontime']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Enable Vacation Mode:</label> <input type=\"checkbox\" name=\"vacationmode\" value=\"1\" class=\"check\"{$vacationcheck} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Enable Refund Policy:</label> <input type=\"checkbox\" name=\"refund_policy\" value=\"1\" class=\"check\"{$refpolicy} /> <span>?</span></div>
<div class=\"border\"></div>
<div class=\"row2\"><label>Disable Register Page:</label> <input type=\"checkbox\" name=\"disable_reg\" value=\"1\" class=\"check\"{$disablereg} /> <span>?</span></div>
<div><label>Disabled Register Page Header Text:</label> <input type=\"text\" name=\"disabled_reg_headertext\" value=\"{$set['disabled_reg_headertext']}\" /> <span>?</span></div>
<div class=\"row2\"><label>Disabled Register Page Text:</label> <input type=\"text\" name=\"disabled_reg_text\" value=\"{$set['disabled_reg_text']}\" /> <span>?</span></div>
<div class=\"border\"></div>
<div><label>Under construction:</label> <input type=\"checkbox\" name=\"underconstruction\" value=\"1\"{$concheck} class=\"check\" /> <span>?</span></div>
<div class=\"row2\"><label>Under construction Page Text:</label> <input type=\"text\" name=\"underconstruction_text\" value=\"{$set['underconstruction_text']}\" /> <span>?</span></div>
<div><label>Under construction ip's:</label> <input type=\"text\" name=\"underconstruction_ip\" value=\"$ip\" /> <span>?</span></div>
<div class='row2'><label>Your Current Ip Address:</label> <input type='text' name=\"{$ip}\" value=\"$ip\"/><span>?</span></div>
<div class=\"border\"></div>
<div class=\"buttons right\"><input type=\"submit\" value=\"Update\" /></div>
</form>
</div>
</div>
</div>";
} else header("Location: index.php");
?>اتصال به دیتا بیس
if(!$c = mysql_connect(DB_HOST, DB_USER, DB_PASS)) {
set_error("We couldn't establish a connection to your MySQL server.");
$error_load = true;
}
if(!mysql_select_db(DB_NAME, $c)) {
set_error("We couldn't establish a connection to your MySQL database.");
$error_load = true;
}
mysql_query("set names 'utf8'");
mysql_query('SET CHARACTER SET utf8;', $c);
mysql_query("SET SESSION collation_connection = 'utf8_persian_ci'", $c); دوستان ممنون میشم منو راهنمایی کنین ، چند روزیه درگیرشم و دیگه آخرین راه این بود که از بچه های برنامه نویس کمک بگیرم:بوس: