Ejemplo n.º 1
0
function f_replace(&$text)
{
    $phrases = array('photo' => array('title' => 'ФОТО', 'function' => 'PhotoLink'), 'album' => array('title' => 'АЛЬБОМ', 'function' => 'AlbumLink'), 'content' => array('title' => 'МАТЕРИАЛ', 'function' => 'ContentLink'), 'form' => array('title' => 'ФОРМА', 'function' => 'insertForm'), 'blank' => array('title' => 'БЛАНК', 'function' => 'insertForm'));
    foreach ($phrases as $phrase) {
        if (mb_strpos($text, $phrase['title']) !== false) {
            $text = replace_text($text, $phrase);
        }
    }
    return true;
}
Ejemplo n.º 2
0
         $mes_title = "Ro Message";
         $form_code = "02";
         $memory_object = "ro_message";
     } else {
         if ($GET_code == 01) {
             $mes_title = "Server Information";
             $form_code = "03";
             $memory_object = "server_info";
         }
     }
     $query = "SELECT memory_value3 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object=\"" . mysql_res($memory_object) . "\"";
     $sql->result = $sql->execute_query($query, 'mescontrol.php');
     $sql->total_query++;
     $row = $sql->fetch_row();
     $message = my_br2nl($row[memory_value3]);
     $message_preview = $row[memory_value3] ? replace_text($row[memory_value3]) : "--------------------";
     opmain_body("{$mes_title}");
     echo "<form action=\"index.php?act=mesctrl&code={$form_code}\" method=\"post\" enctype=\"multipart/form-data\" name=\"t_post_form\" id=\"t_post_form\" OnSubmit=\"document.t_post_form.Submit.disabled=true; return true;\">\n<TABLE width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" align=\"center\" class=\"emptytable\">\n\t<TBODY>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD width=\"100%\" colspan=\"2\">\n\t\t\t\t<div class=\"title_face3\"><B>Code Buttons</B></div>\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title6\">\n\t\t\t<TD width=\"30%\"> </TD>\n\t\t\t<TD width=\"70%\">\n";
     get_bbcode('t_post_form');
     echo "\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD colspan=\"2\">\n\t\t\t\t<div class=\"title_face3\"><B>Enter {$mes_title}</B></div>\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title6\">\n\t\t\t<TD vAlign=\"top\">\n";
     emotions_select('t_post_form');
     echo "\t\t\t</TD>\n\t\t\t<TD vAlign=\"top\">\n\t\t\t\t<textarea style=\"width:100%\" name=\"t_mes\" cols=\"60\" rows=\"15\" class=\"textinput\">{$message}</textarea>\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD align=\"center\">\n\t\t\t\t<select name=\"change_edit\" onChange=\"if(document.t_post_form.change_edit.value==-1){return false;}else{var A1=document.t_post_form.change_edit.value; document.location.replace(''+A1+'');}\" class=\"selectmenu\">\n\t\t\t\t\t<option value=\"-1\" selected>���� --�Select Action�--����</option>\n";
     $selected = "value=\"-1\" class=\"slbackground\"";
     $ADD_OPTION1 = $GET_code == 00 ? $selected : "value=\"index.php?act=mesctrl&code=00\"";
     $ADD_OPTION2 = $GET_code == 01 ? $selected : "value=\"index.php?act=mesctrl&code=01\"";
     echo "\t\t\t\t\t<option " . $ADD_OPTION1 . ">- Edit Ro Message</option>\n\t\t\t\t\t<option " . $ADD_OPTION2 . ">- Edit Server Information</option>\n\t\t\t\t</select>\n\t\t\t</TD>\n\t\t\t<TD>\n\t\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"textinput\">\n\t\t\t\t<input type=\"reset\" name=\"Reset\" value=\"Restore\" class=\"textinput\">\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title6\" height=\"100%\">\n\t\t\t<TD class=\"title_face4\" vAlign=\"top\" colspan=\"2\">\n\t\t\t\t<div class=\"poststyle\">{$message_preview}</div>\n\t\t\t</TD>\n\t\t</TR>\n\t</TBODY>\n</TABLE>\n</form>\n<script type='text/javascript'>\n\tvar max_width = " . $CONFIG_max_img_width . ";\n\tvar max_height = " . $CONFIG_max_img_height . ";\n\tvar total_img_resize = " . $CP[images_num] . ";\n\twindow.onload=resize_img;\n</script>\n";
     clmain_body();
 } else {
     if ($GET_code == 02) {
         $query = "SELECT COUNT(*) FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object=\"ro_message\"";
         $sql->result = $sql->execute_query($query, 'mescontrol.php');
Ejemplo n.º 3
0
<!--
// =========================================================================
//    ______                                              
//   / __/ /____ ________ ____ ___ _  ___ ___             
//  _\ \/ __/ _ `/ __/ _ `/ _ `/  ' \/ -_|_-<             
// /___/\__/\_,_/_/  \_, /\_,_/_/_/_/\__/___/             
//   _____          /___/        __  ___                __
//  / ___/__  ___  / /________  / / / _ \___ ____  ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) / 
// \___/\___/_//_/\__/_/  \___/_/ /_/   \_,_/_//_/\__/_/ 
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
if (!$SERVER['system_safe']) {
    exit;
}
$query = "SELECT memory_value3 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object=\"server_info\"";
$sql->result = $sql->execute_query($query, 'main.php');
$sql->total_query++;
$row = $sql->fetch_row();
$serverinfo_mes = $row[memory_value3] ? replace_text($row[memory_value3]) : "--------------------";
opmain_body("Server Information", 150);
echo "\n<TABLE width=\"100%\" height=\"100%\" align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\n\t<TBODY>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD width=\"100%\"  height=\"25\" vAlign=\"top\"></TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title6\" height=\"100%\">\n\t\t\t<TD class=\"title_face4\" vAlign=\"top\">\n\t\t\t\t<div class=\"poststyle\">" . $serverinfo_mes . "</div>\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD width=\"100%\" height=\"25\"></TD>\n\t\t</TR>\n\t<TBODY>\n</TABLE>\n<script type='text/javascript'>\n\tvar max_width = " . $CONFIG_max_img_width . ";\n\tvar max_height = " . $CONFIG_max_img_height . ";\n\tvar total_img_resize = " . $CP[images_num] . ";\n\twindow.onload=resize_img;\n</script>\n";
clmain_body();
Ejemplo n.º 4
0
     echo "\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t<TD width=\"80%\" colspan=\"2\">\n\t\t\t\t\t\t\t\t<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n\t\t\t\t\t\t\t\t\t<TBODY>\n\t\t\t\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t\t\t\t<TD width=\"70%\" class=\"textinput\">\n\t\t\t\t\t\t\t\t\t\t\t\t{$reply_emo} {$lang['Post']}: {$reply_date}\n\t\t\t\t\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t\t\t\t\t<TD width=\"30%\" align=\"right\">\n\t\t\t\t\t\t\t\t\t\t\t\t{$reply_ip} Post: <a href=\"javascript:link_to_post('http://" . $_SERVER[HTTP_HOST] . "" . $_SERVER[SCRIPT_NAME] . "?showtopic={$GET_showtopic}&view=findpost&p={$row['reply_id']}')\">#{$reply_num}</a>\n\t\t\t\t\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t\t\t</TBODY>\n\t\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t<TR height=\"150\" class=\"topic_title8\">\n\t\t\t\t\t\t\t<TD width=\"20%\"  vAlign=\"top\" style=\"font-size: 11px; font-family: verdana, helvetica, sans-serif;\">\n";
     if ($IS_GUEST) {
         echo "\t\t\t\t\t\t\t\t<BR>{$lang['Group']}: {$reply_group}\n";
     } else {
         echo "\t\t\t\t\t\t\t\t<BR>\n\t\t\t\t\t\t\t\t<div align=\"center\">\n\t\t\t\t\t\t\t\t\t{$reply_avatar}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<BR>{$rank_title}\n\t\t\t\t\t\t\t\t<BR><img src=\"theme/{$STORED['THEME']}/images/groups/{$reply_imgroup}\" alt=\"Group Icon\">\n\t\t\t\t\t\t\t\t<BR><BR>{$lang['Group']}: {$reply_group}\n\t\t\t\t\t\t\t\t<BR>{$lang['Posts']}: {$reply_post}\n\t\t\t\t\t\t\t\t<BR>{$lang['Mem_No']}: {$reply_number}\n\t\t\t\t\t\t\t\t<BR>{$lang['Join']}: {$reply_joined}\n";
     }
     echo "\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t<TD width=\"80%\" colspan=\"2\" vAlign=\"top\">\n\t\t\t\t\t\t\t\t<span id=\"replyid_" . $row[reply_id] . "\"><div class=\"poststyle\">{$reply_message}</div>\n";
     if (!empty($row[reply_edit_name])) {
         echo "\t\t\t\t\t\t\t\t<BR><BR><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>\n";
     }
     echo "\t\t\t\t\t\t\t\t</span>\n";
     if (!empty($row[reply_upload])) {
         echo "\t\t\t\t\t\t\t\t<BR><BR><a href=\"{$CONFIG_uploads_folder}/[{$row['reply_user_id']}]{$row['reply_upload']}\" title=\"{$row['reply_upload']}\" target=\"_blank\"><I>Attach file: {$row['reply_upload']}</I></a>\n";
     }
     if (!empty($reply_signature)) {
         $reply_signature_ = replace_text($reply_signature);
         echo "\t\t\t\t\t\t\t\t<BR><BR><BR>--------------------<BR>{$reply_signature_}\n";
     }
     echo "\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t<TR class=\"topic_title5\">\n\t\t\t\t\t\t\t<TD class=\"textinput\">\n\t\t\t\t\t\t\t\t{$status_bar}\n";
     if ($IS_DELETE_POST && $reply_num != '1') {
         $reply_del = "<a href=\"javascript:delete_post('index.php?act=post&code=03&t={$GET_showtopic}&p={$row['reply_id']}')\"><img src=\"theme/{$STORED['THEME']}/images/webboard/p_delete.gif\" border=\"0\" alt=\"Delete�Post\"></a>";
     } else {
         $reply_del = '';
     }
     echo "\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t<TD colspan=\"2\">\n\t\t\t\t\t\t\t\t<TABLE width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n\t\t\t\t\t\t\t\t\t<TBODY>\n\t\t\t\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t\t\t\t<TD align=\"left\">\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"javascript:scroll(0,0)\"><img src=\"theme/{$STORED['THEME']}/images/webboard/p_up.gif\" border=\"0\" alt=\"top\"></a>\n\t\t\t\t\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t\t\t\t\t<TD align=\"right\">\n\t\t\t\t\t\t\t\t\t\t\t\t{$reply_del}\n";
     if (!empty($CP[login_id]) && ($CP[login_id] == $row[reply_user_id] || $IS_EDIT_POST)) {
         echo "<a style='text-decoration:none;' id=\"edit_post_" . $row[reply_id] . "\" href=\"index.php?act=post&code=02&f={$forum_id}&t={$GET_showtopic}&p={$row['reply_id']}\"><img src=\"theme/{$STORED['THEME']}/images/webboard/p_edit.gif\" border=\"0\" alt=\"Edit�Post\"></a>\n<script type='text/javascript'>\nmenu_build_menu('edit_post_" . $row[reply_id] . "','85',\n\tnew Array('<a id=\\'Button\\' onclick=\"hyperlink(\\'index.php?act=post&code=02&f={$forum_id}&t={$GET_showtopic}&p={$row['reply_id']}\\');return false;\" href=\"#\">Full Edit</a>',\n\t'<a id=\\'Button\\' onclick=\"quick_edit(\\'replyid_" . $row[reply_id] . "\\',\\'p={$row['reply_id']}\\');return false;\" href=\"#\">Quick Edit</a>'));\n</script>\n";
     }
     echo "\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"index.php?act=post&code=01&f={$forum_id}&t={$GET_showtopic}&qpid={$row['reply_id']}\"><img src=\"theme/{$STORED['THEME']}/images/webboard/p_quote.gif\" border=\"0\" alt=\"Quote�Post\"></a>\n\t\t\t\t\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t\t\t</TBODY>\n\t\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t</TR>\n";
 }
 echo "\t\t\t\t\t</TBODY>\n\t\t\t\t</TABLE>\n\t\t\t</TD>\n\t\t</TR>\n\t</TBODY>\n</TABLE>\n<script type='text/javascript'>\n\tvar max_width = " . $CONFIG_max_img_width . ";\n\tvar max_height = " . $CONFIG_max_img_height . ";\n\tvar total_img_resize = " . $CP[images_num] . ";\n\twindow.onload=resize_img;\n</script>\n<BR>\n<TABLE width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n\t<TBODY>\n\t\t<TR>\n\t\t\t<TD>\n";
Ejemplo n.º 5
0
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
if (!$SERVER['system_safe']) {
    exit;
}
$query = "SELECT memory_value1,memory_value2,memory_value3 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object=\"ro_message\"";
$sql->result = $sql->execute_query($query, 'main.php');
$sql->total_query++;
$row = $sql->fetch_row();
$announced_date = get_date("Y-m-j", $row[memory_value2]);
$announced_mes = $row[memory_value3] ? replace_text($row[memory_value3]) : "--------------------";
opmain_body("{$lang['RO_Mes']}", 150);
echo "<TABLE width=\"100%\" height=\"100%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n\t<TBODY>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD width=\"100%\" height=\"25\" vAlign=\"top\"></TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title6\" height=\"100%\">\n\t\t\t<TD class=\"title_face4\" vAlign=\"top\">\n\t\t\t\t<div class=\"poststyle\">{$announced_mes}</div>\n\t\t\t</TD>\n\t\t</TR>\n\t\t<TR class=\"topic_title5\">\n\t\t\t<TD width=\"100%\" vAlign=\"top\" align=\"right\">\n\t\t\t\t<B>{$lang['Announced']} <U>{$row['memory_value1']}</U>, {$lang['Date']}: {$announced_date}</B>\n\t\t\t</TD>\n\t\t</TR>\n\t<TBODY>\n</TABLE>\n<script type='text/javascript'>\n\tvar max_width = " . $CONFIG_max_img_width . ";\n\tvar max_height = " . $CONFIG_max_img_height . ";\n\tvar total_img_resize = " . $CP[images_num] . ";\n\twindow.onload=resize_img;\n</script>\n";
clmain_body();
include_once "news.php";
if ($CONFIG_show_last_topic_reply) {
    echo "<BR>\n";
    opmain_body("{$lang['Last_TRP']}");
    echo "<TABLE width=\"100%\" height=\"100%\" align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\n\t<TBODY>\n";
    $query = "SELECT us.display_name, t.* FROM {$CONFIG_sql_cpdbname}.board_topic t\n\t\tLEFT JOIN {$CONFIG_sql_cpdbname}.user_profile us ON (us.user_id=t.topic_lastreply_name)\n\tORDER by t.topic_last_action_date DESC LIMIT " . mysql_res($CONFIG_show_last_topic_reply_per) . "";
    $sql->result = $sql->execute_query($query, 'main.php');
    $sql->total_query++;
    if ($sql->count_rows() > 0) {
        while ($row = $sql->fetch_row()) {
            $topic_lastreply_name = get_displayname($row[display_name], $row[topic_lastreply_name]);
            $topic_lastreply_name = $topic_lastreply_name == $lang[Guest] ? $lang[Guest] : "<a href=\"index.php?showuser="******"\">{$topic_lastreply_name}</a>";
Ejemplo n.º 6
0
function get_save_quick_edit($val, $reply_id)
{
    header("Content-type: text/xml;charset=windows-874");
    global $CONFIG_sql_cpdbname, $STORED, $SERVER, $CONFIG_max_post_length, $CP;
    $reply_id = (int) $reply_id;
    $val = iconv("UTF-8", "windows-874", $val);
    $val = str_replace("symbol_and", "&", $val);
    $val = str_replace("symbol_plus", "+", $val);
    $form_id = "quick_edit_form_" . $reply_id . "";
    $sql = new MySQL();
    $query = "SELECT reply_id,reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($reply_id) . "\"";
    $sql->result = $sql->execute_query($query, 'lib_ajax.php');
    $row = $sql->fetch_row();
    $IS_EDIT_POST = checkprivilege_action($CP[login_id], g_edit_posts) ? 1 : 0;
    if (!empty($CP[login_id]) && ($CP[login_id] == $row[reply_user_id] || $IS_EDIT_POST) && length($val, 3, $CONFIG_max_post_length)) {
        $val = checkstring($val, 1);
        $sql->execute_query("UPDATE {$CONFIG_sql_cpdbname}.board_reply SET reply_message = \"" . $val . "\", reply_ip=\"" . $CP['ip_address'] . "\",reply_edit_name=\"" . $CP['login_name'] . "\",reply_edit_date=\"" . $CP['time'] . "\" WHERE reply_id = \"" . mysql_res($row['reply_id']) . "\"", 'lib_ajax.php');
        $query = "SELECT reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($row['reply_id']) . "\"";
        $sql->result = $sql->execute_query($query, 'lib_ajax.php');
        $row = $sql->fetch_row();
        $reply_message = replace_text($row[reply_message], $img_num);
        $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
        echo "<div class=\"poststyle\">{$reply_message}</div>\n<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>\n";
    } else {
        $reply_message = replace_text($row[reply_message]);
        echo "<div class=\"poststyle\">{$reply_message}</div>";
        if (!empty($row[reply_edit_name])) {
            $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
            echo "<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>";
        }
    }
}
Ejemplo n.º 7
0
//   _____          /___/        __  ___                __
//  / ___/__  ___  / /________  / / / _ \___ ____  ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) / 
// \___/\___/_//_/\__/_/  \___/_/ /_/   \_,_/_//_/\__/_/ 
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
if (!$SERVER['system_safe']) {
    exit;
}
$GET_post_id = (int) $GET_post_id;
$query = "SELECT title,message,poster,date FROM {$CONFIG_sql_cpdbname}.mainnews WHERE post_id = \"" . mysql_res($GET_post_id) . "\" LIMIT 0,1";
$sql->result = $sql->execute_query($query, 'shownews.php');
$sql->total_query++;
if ($sql->count_rows()) {
    $row = $sql->fetch_row();
    $title_news = $row[title];
    $reply_message = replace_text($row[message]);
    $poster_news = $row[poster];
    $date_news = date("Y-m-j", $row[date]);
    opmain_body("{$lang['Title']} : {$title_news}", 150);
    echo "\n<TABLE width=\"100%\" height=\"100%\" align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\n\t<TR class=\"topic_title5\">\n\t\t<TD width=\"100%\" vAlign=\"top\">\n\t\t\t&nbsp;\n\t\t</TD>\n\t</TR>\n\t<TR class=\"topic_title6\" height=\"100%\">\n\t\t<TD class=\"title_face4\" vAlign=\"top\">\n\t\t\t<div class=\"poststyle\">{$reply_message}</div>\n\t\t</TD>\n\t</TR>\n\t<TR class=\"topic_title5\">\n\t\t<TD align=\"right\" vAlign=\"top\">\n\t\t\t<B>{$lang['Announced']} <U>{$poster_news}</U>, {$lang['Date']}: {$date_news}</B>\n\t\t</TD>\n\t</TR>\n</TABLE>\n<script type='text/javascript'>\n\tvar max_width = " . $CONFIG_max_img_width . ";\n\tvar max_height = " . $CONFIG_max_img_height . ";\n\tvar total_img_resize = " . $CP[images_num] . ";\n\twindow.onload=resize_img;\n</script>\n";
    clmain_body();
} else {
    redir("index.php?act=idx", "{$lang['News_nf']}", 3);
}