Мод награды

VOC++ BSE Мод награды 2015-04-18

Нет прав для скачивания
3-jpg.2267
6-jpg.2268
4-jpg.2266
9-jpg.2269
10-jpg.2270
1-jpg.2271
2-jpg.2272
8-jpg.2273
5-jpg.2274
7-jpg.2275

После установки данного мода можно будет выдавать чатланам награды
Установка:
1. В файле /chat/admin_work.php
найти
PHP:
switch ($op) {
и после него добавить
PHP:
case "nagrads":
if (!($current_user->user_class & ADM_CREATE_ROOMS)) {
$error_text = "$w_no_admin_rights";
include($file_path."designes/".$design."/error_page.php");
exit;
}
set_variable("txtCommonNick");
$user_to_search = $txtCommonNick;
include($ld_engine_path."users_search.php");
if (count($u_ids)) {
$html_to_out .= "<form method=\"post\" action=\"admin_work.php\" target=\"voc_admin_work\">".
"<input type=\"hidden\" name=\"session\" value=\"$session\">".
"<input type=\"hidden\" name=\"op\" value=\"do_nagrads\">".
"$w_select_nick: <select name=\"txtCommonNick\" style=\"{width:100px;height: 20px;}\">";
for($i=0;$i<count($u_ids);$i++)
{
$html_to_out .= "<option value=\"".$u_ids[$i]."\">".$u_names[$i]."</option>\n";
}
$html_to_out .= "</select>\n";
$html_to_out .= "<input type=\"submit\" value=\"OK\" class=\"input_button\">".
"</form>";}
else{
$html_to_out = "<form method=\"post\" action=\"admin_work.php\" target=\"voc_admin_work\">".
"<input type=\"hidden\" name=\"session\" value=\"$session\">".
"<input type=\"hidden\" name=\"op\" value=\"nagrads\">".
"Ник: <input type=\"text\" name=\"txtCommonNick\">".
"<input type=\"submit\" value=\"OK\" class=\"input_button\">".
"</form>";}
break;
case "do_nagrads":
if (!($current_user->user_class & ADM_BAN)) {
$error_text = "$w_no_admin_rights";
include($file_path."designes/".$design."/error_page.php");
exit;
}
set_variable("txtCommonNick");
set_variable("nagrada_1");
set_variable("nagrada_2");
set_variable("nagrada_3");
set_variable("nagrada_4");
set_variable("nagrada_5");
set_variable("nagrada_6");
set_variable("nagrada_7");
set_variable("nagrada_8");
set_variable("nagrada_9");
set_variable("nagrada_10");
set_variable("update");
$is_regist = $txtCommonNick;
if($update){
include($ld_engine_path."users_get_object.php");
if ($nagrada_1 == "on") $current_user->nagrada_1=1; else $current_user->nagrada_1 = 0;
if ($nagrada_2 == "on") $current_user->nagrada_2=1; else $current_user->nagrada_2 = 0;
if ($nagrada_3 == "on") $current_user->nagrada_3=1; else $current_user->nagrada_3 = 0;
if ($nagrada_4 == "on") $current_user->nagrada_4=1; else $current_user->nagrada_4 = 0;
if ($nagrada_5 == "on") $current_user->nagrada_5=1; else $current_user->nagrada_5 = 0;
if ($nagrada_6 == "on") $current_user->nagrada_6=1; else $current_user->nagrada_6 = 0;
if ($nagrada_7 == "on") $current_user->nagrada_7=1; else $current_user->nagrada_7 = 0;
if ($nagrada_8 == "on") $current_user->nagrada_8=1; else $current_user->nagrada_8 = 0;
if ($nagrada_9 == "on") $current_user->nagrada_9=1; else $current_user->nagrada_9 = 0;
if ($nagrada_10 == "on") $current_user->nagrada_10=1; else $current_user->nagrada_10 = 0;
include($ld_engine_path."user_info_update.php");}
include($ld_engine_path."users_get_object.php");
$html_to_out = "<form method=\"post\" action=\"admin_work.php\" target=\"voc_admin_work\">".
"<input type=\"hidden\" name=\"session\" value=\"$session\">".
"<input type=\"hidden\" name=\"op\" value=\"do_nagrads\">".
"<input type=\"hidden\" name=\"txtCommonNick\" value=\"$is_regist\">".
"<input type=\"hidden\" name=\"update\" value=\"1\">";
$html_to_out .= "<tr>\n";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_1\"";
if ($current_user->nagrada_1 == 1) $html_to_out .= " checked";
$html_to_out .= ">1</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_2\"";
if ($current_user->nagrada_2 == 1) $html_to_out .= " checked";
$html_to_out .= ">2</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_3\"";
if ($current_user->nagrada_3 == 1) $html_to_out .= " checked";
$html_to_out .= ">3</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_4\"";
if ($current_user->nagrada_4 == 1) $html_to_out .= " checked";
$html_to_out .= ">4</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_5\"";
if ($current_user->nagrada_5 == 1) $html_to_out .= " checked";
$html_to_out .= ">5</td>";
$html_to_out .= "</tr>\n";
$html_to_out .= "<tr>\n";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_6\"";
if ($current_user->nagrada_6 == 1) $html_to_out .= " checked";
$html_to_out .= ">6</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_7\"";
if ($current_user->nagrada_7 == 1) $html_to_out .= " checked";
$html_to_out .= ">7</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_8\"";
if ($current_user->nagrada_8 == 1) $html_to_out .= " checked";
$html_to_out .= ">8</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_9\"";
if ($current_user->nagrada_9 == 1) $html_to_out .= " checked";
$html_to_out .= ">9</td>";
$html_to_out .= "<td><input type=checkbox name=\"nagrada_10\"";
if ($current_user->nagrada_10 == 1) $html_to_out .= " checked";
$html_to_out .= ">10</td>";
$html_to_out .= "</tr>\n";
$html_to_out .= "</table>\n";
$html_to_out .= "<input type=\"submit\" value=\"OK\" class=\"input_button\"></form>\n";
break;
2. В файле /chat/admin_navi.php
после
PHP:
$admin_navi = array();
добавить
PHP:
if ($current_user->user_class & ADM_BAN) $admin_navi[count($admin_navi)] = array("title"=>"Награды", "link"=>$chat_url."admin_work.php?op=nagrads&session=".$session);
3. В файле /chat/inc_user_class.php
после
PHP:
class User {
добавить
PHP:
var $nagrada_1 = 0;
var $nagrada_2 = 0;
var $nagrada_3 = 0;
var $nagrada_4 = 0;
var $nagrada_5 = 0;
var $nagrada_6 = 0;
var $nagrada_7 = 0;
var $nagrada_8 = 0;
var $nagrada_9 = 0;
var $nagrada_10 = 0;
4. В файле: chat/designes/ваш дизайн/profile_content.php
после
PHP:
echo $w_roz_marr_it_no;
}
}
?></b></font></td>
вставить
PHP:
<?echo $alf?> <?
if($current_user->nagrada_1) echo "<img src=".$chat_url."status/1.gif border=\"0\">";
if($current_user->nagrada_2) echo "<img src=".$chat_url."status/2.gif border=\"0\">";
if($current_user->nagrada_3) echo "<img src=".$chat_url."status/3.gif border=\"0\">";
if($current_user->nagrada_4) echo "<img src=".$chat_url."status/4.gif border=\"0\">";
if($current_user->nagrada_5) echo "<img src=".$chat_url."status/5.gif border=\"0\">";
if($current_user->nagrada_6) echo "<img src=".$chat_url."status/6.gif border=\"0\">";
if($current_user->nagrada_7) echo "<img src=".$chat_url."status/7.gif border=\"0\">";
if($current_user->nagrada_8) echo "<img src=".$chat_url."status/8.gif border=\"0\">";
if($current_user->nagrada_9) echo "<img src=".$chat_url."status/9.gif border=\"0\">";
if($current_user->nagrada_10) echo "<img src=".$chat_url."status/10.gif border=\"0\">"; ?>
5. В файле /chat/languages/ru.php
В самом низу добавить:
PHP:
$alf= "Награды:";
6. Содержимое архива загрузить в корень чата
Автор
DJ_DEMAN
Скачивания
8
Первый выпуск
Обновление
Оценка
5,00 звёзд 1 оценок

Поделиться ресурсом