当前位置: 首页>>代码示例>>PHP>>正文


PHP Functions_Lib::format_text方法代码示例

本文整理汇总了PHP中Functions_Lib::format_text方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions_Lib::format_text方法的具体用法?PHP Functions_Lib::format_text怎么用?PHP Functions_Lib::format_text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Functions_Lib的用法示例。


在下文中一共展示了Functions_Lib::format_text方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: build_page

 /**
  * method build_page
  * param
  * return main method, loads everything
  */
 private function build_page()
 {
     $parse = $this->_lang;
     $parse['js_path'] = XGP_ROOT . JS_PATH;
     if (isset($_POST) && $_POST && $_GET['mode'] == "change") {
         $info = array(1 => array('color' => 'yellow'), 2 => array('color' => 'skyblue'), 3 => array('color' => 'red'));
         $color = $info[$this->_current_user['user_authlevel']]['color'];
         $level = $this->_lang['user_level'][$this->_current_user['user_authlevel']];
         if (isset($_POST['tresc']) && $_POST['tresc'] != '' && (isset($_POST['temat']) && $_POST['temat'] != '') && (isset($_POST['message']) or isset($_POST['mail']))) {
             $sq = parent::$db->query("SELECT `user_id` , `user_name`, `user_email`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . USERS . "");
             if (isset($_POST['message'])) {
                 $time = time();
                 $from = '<font color="' . $color . '">' . $level . ' ' . $this->_current_user['user_name'] . '</font>';
                 $subject = '<font color="' . $color . '">' . $_POST['temat'] . '</font>';
                 $message = '<font color="' . $color . '"><b>' . Functions_Lib::format_text($_POST['tresc']) . '</b></font>';
                 while ($u = parent::$db->fetch_array($sq)) {
                     Functions_Lib::send_message($u['user_id'], $this->_current_user['user_id'], $time, 5, $from, $subject, $message);
                     $_POST['tresc'] = str_replace(":name:", $u['user_name'], $_POST['tresc']);
                 }
             }
             if (isset($_POST['mail'])) {
                 $i = 0;
                 while ($u = parent::$db->fetch_array($sq)) {
                     mail($u['user_email'], $_POST['temat'], $_POST['tresc']);
                     // 20 per row
                     if ($i % 20 == 0) {
                         sleep(1);
                         // wait, prevent flooding
                     }
                     $i++;
                 }
             }
             $parse['alert'] = Administration_Lib::save_message('ok', $this->_lang['ma_message_sended']);
         } else {
             $parse['alert'] = Administration_Lib::save_message('warning', $this->_lang['ma_subject_needed']);
         }
     }
     parent::$page->display(parent::$page->parse_template(parent::$page->get_template('adm/global_message_view'), $parse));
 }
开发者ID:rampmaster,项目名称:XG-Proyect-v3.x.x,代码行数:44,代码来源:globalmessage.php

示例2: build_page

 /**
  * method build_page
  * param
  * return main method, loads everything
  */
 private function build_page()
 {
     $this->_lang['js_path'] = XGP_ROOT . JS_PATH;
     $parse = $this->_lang;
     $a = isset($_GET['a']) ? intval($_GET['a']) : NULL;
     $n = isset($_GET['n']) ? intval($_GET['n']) : NULL;
     $s = isset($_POST['s']) ? intval($_POST['s']) : NULL;
     if ($s == 1 or $s == 2) {
         $time = time();
         $priority = intval($_POST['u']);
         $title = $_POST['title'] ? parent::$db->escape_value(strip_tags($_POST['title'])) : "Sin t&iacute;tulo";
         $text = $_POST['text'] ? Functions_Lib::format_text($_POST['text']) : $this->_lang['nt_no_text'];
         if ($s == 1) {
             parent::$db->query("INSERT INTO " . NOTES . " SET\n\t\t\t\t\t\t\t\t\t\tnote_owner=" . intval($this->_current_user['user_id']) . ",\n\t\t\t\t\t\t\t\t\t\tnote_time={$time},\n\t\t\t\t\t\t\t\t\t\tnote_priority={$priority},\n\t\t\t\t\t\t\t\t\t\tnote_title='{$title}',\n\t\t\t\t\t\t\t\t\t\tnote_text='{$text}'");
             Functions_Lib::redirect('game.php?page=notes');
         } elseif ($s == 2) {
             $id = intval($_POST['n']);
             $note_query = parent::$db->query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . NOTES . "\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE note_id=" . intval($id) . " AND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnote_owner=" . intval($this->_current_user['user_id']) . "");
             if (!$note_query) {
                 Functions_Lib::redirect('game.php?page=notes');
             }
             parent::$db->query("UPDATE `" . NOTES . "` SET\n\t\t\t\t\t\t\t\t\t\tnote_time={$time},\n\t\t\t\t\t\t\t\t\t\tnote_priority={$priority},\n\t\t\t\t\t\t\t\t\t\tnote_title='{$title}',\n\t\t\t\t\t\t\t\t\t\tnote_text='{$text}'\n\t\t\t\t\t\t\t\t\t\tWHERE note_id=" . intval($id) . "");
             Functions_Lib::redirect('game.php?page=notes');
         }
     } elseif ($_POST) {
         foreach ($_POST as $a => $b) {
             if (preg_match("/delmes/i", $a) && $b == "y") {
                 $id = str_replace("delmes", "", $a);
                 $note_query = parent::$db->query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `" . NOTES . "`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `note_id` = " . (int) $id . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `note_owner` = " . $this->_current_user['user_id'] . "");
                 if ($note_query) {
                     parent::$db->query("DELETE FROM `" . NOTES . "`\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `note_id` = " . (int) $id . ";");
                 }
             }
         }
         Functions_Lib::redirect('game.php?page=notes');
     } else {
         if ($a == 1) {
             $parse['c_Options'] = "<option value=2 selected=selected>" . $this->_lang['nt_important'] . "</option>\n\t\t\t\t<option value=1>" . $this->_lang['nt_normal'] . "</option>\n\t\t\t\t<option value=0>" . $this->_lang['nt_unimportant'] . "</option>";
             $parse['TITLE'] = $this->_lang['nt_create_note'];
             $parse['inputs'] = "<input type=hidden name=s value=1>";
             parent::$page->display(parent::$page->parse_template(parent::$page->get_template('notes/notes_form'), $parse), FALSE, '', FALSE);
         } elseif ($a == 2) {
             $SELECTED['0'] = '';
             $SELECTED['1'] = '';
             $SELECTED['2'] = '';
             $note = parent::$db->query_fetch("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `" . NOTES . "`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `note_owner` = " . $this->_current_user['user_id'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `note_id` = " . (int) $n . ";");
             if (!$note) {
                 Functions_Lib::redirect('game.php?page=notes');
             }
             $SELECTED[$note['note_priority']] = ' selected="selected"';
             $parse['c_Options'] = "<option value=2{$SELECTED['2']}>" . $this->_lang['nt_important'] . "</option>\n\t\t\t\t<option value=1{$SELECTED['1']}>" . $this->_lang['nt_normal'] . "</option>\n\t\t\t\t<option value=0{$SELECTED['0']}>" . $this->_lang['nt_unimportant'] . "</option>";
             $parse['TITLE'] = $this->_lang['nt_edit_note'];
             $parse['inputs'] = '<input type="hidden" name="s" value="2"><input type="hidden" name="n" value=' . $note['note_id'] . '>';
             $parse['asunto'] = $note['note_title'];
             $parse['texto'] = $note['note_text'];
             parent::$page->display(parent::$page->parse_template(parent::$page->get_template('notes/notes_form'), $parse), FALSE, '', FALSE);
         } else {
             $notes_query = parent::$db->query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `" . NOTES . "`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `note_owner` = " . $this->_current_user['user_id'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY `note_time` DESC");
             $count = 0;
             $NotesBodyEntryTPL = parent::$page->get_template('notes/notes_body_entry');
             $list = '';
             while ($note = parent::$db->fetch_array($notes_query)) {
                 $count++;
                 $parse['NOTE_COLOR'] = $this->return_priority($note['note_priority']);
                 $parse['NOTE_ID'] = $note['note_id'];
                 $parse['NOTE_TIME'] = date(Functions_Lib::read_config('date_format_extended'), $note['note_time']);
                 $parse['NOTE_TITLE'] = $note['note_title'];
                 $parse['NOTE_TEXT'] = strlen($note['note_text']);
                 $list .= parent::$page->parse_template($NotesBodyEntryTPL, $parse);
             }
             if ($count == 0) {
                 $list .= "<tr><th colspan=4>" . $this->_lang['nt_you_dont_have_notes'] . "</th>\n";
             }
             $parse['BODY_LIST'] = $list;
             parent::$page->display(parent::$page->parse_template(parent::$page->get_template('notes/notes_body'), $parse), FALSE, '', FALSE);
         }
     }
 }
开发者ID:rampmaster,项目名称:XG-Proyect-v3.x.x,代码行数:83,代码来源:notes.php

示例3: build_page

 /**
  * method build_page
  * param
  * return main method, loads everything
  */
 private function build_page()
 {
     // some values by default
     $parse = $this->_lang;
     $parse['js_path'] = XGP_ROOT . JS_PATH;
     // display an specific category of items
     if (isset($_GET['dsp']) && $_GET['dsp'] == 1 && $this->_have_premium) {
         $mode = '';
         $get_messages = '';
         foreach ($_GET as $field => $value) {
             if (Functions_Lib::in_multiarray($field, $this->_message_type)) {
                 $type_id = Functions_lib::recursive_array_search($field, $this->_message_type);
                 $get_messages .= $type_id . ',';
                 $active[$type_id] = 1;
             }
         }
         // get list of messages
         $message_list = parent::$db->query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `" . MESSAGES . "`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `message_receiver` = " . $this->_current_user['user_id'] . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `message_type` IN (" . rtrim($get_messages, ',') . ");");
         // set messages as read
         parent::$db->query("UPDATE `" . MESSAGES . "`\n\t\t\t\t\t\t\t\t\tSET `message_read` = '1'\n\t\t\t\t\t\t\t\t\tWHERE `message_receiver` = " . $this->_current_user['user_id'] . "\n\t\t\t\t\t\t\t\t\t\tAND `message_type` IN (" . rtrim($get_messages, ',') . ");");
     } else {
         $mode = isset($_GET['mode']) ? $_GET['mode'] : NULL;
     }
     // to delete something
     $to_delete = isset($_POST['deletemessages']) ? $_POST['deletemessages'] : NULL;
     if (isset($to_delete)) {
         $mode = "delete";
     }
     $write_to = isset($_GET['id']) ? (int) $_GET['id'] : NULL;
     switch ($mode) {
         case 'write':
             $text = '';
             $error_page = '';
             if (!is_numeric($write_to)) {
                 Functions_Lib::redirect('game.php?page=messages');
             } else {
                 $OwnerHome = parent::$db->query_fetch("SELECT u.`user_name`, p.`planet_galaxy`, p.`planet_system`, p.`planet_planet`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . PLANETS . " AS p\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . USERS . " as u ON p.planet_user_id = u.user_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE p.`planet_user_id` = '" . (int) $write_to . "';");
                 if (!$OwnerHome) {
                     Functions_Lib::redirect('game.php?page=messages');
                 }
             }
             if ($_POST) {
                 $error = 0;
                 if (!$_POST['subject']) {
                     $error++;
                     $parse['error_text'] = $this->_lang['mg_no_subject'];
                     $parse['error_color'] = '#FF0000';
                     $error_page = parent::$page->parse_template(parent::$page->get_template('messages/messages_error_table'), $parse);
                 }
                 if (!$_POST['text']) {
                     $error++;
                     $parse['error_text'] = $this->_lang['mg_no_text'];
                     $parse['error_color'] = '#FF0000';
                     $error_page = parent::$page->parse_template(parent::$page->get_template('messages/messages_error_table'), $parse);
                 }
                 if ($error == 0) {
                     $parse['error_text'] = $this->_lang['mg_msg_sended'];
                     $parse['error_color'] = '#00FF00';
                     $error_page = parent::$page->parse_template(parent::$page->get_template('messages/messages_error_table'), $parse);
                     $Owner = $write_to;
                     $Sender = $this->_current_user['user_id'];
                     $From = $this->_current_user['user_name'] . ' [' . $this->_current_user['user_galaxy'] . ':' . $this->_current_user['user_system'] . ':' . $this->_current_user['user_planet'] . ']';
                     $Subject = $_POST['subject'];
                     $Message = Functions_Lib::format_text($_POST['text']);
                     Functions_Lib::send_message($Owner, $Sender, '', 4, $From, $Subject, $Message);
                     $subject = '';
                     $text = '';
                 }
             }
             $parse['id'] = $write_to;
             $parse['to'] = $OwnerHome['user_name'] . ' [' . $OwnerHome['planet_galaxy'] . ':' . $OwnerHome['planet_system'] . ':' . $OwnerHome['planet_planet'] . ']';
             $parse['subject'] = !isset($subject) ? $this->_lang['mg_no_subject'] : $subject;
             $parse['text'] = $text;
             $parse['status_message'] = $error_page;
             parent::$page->display(parent::$page->parse_template(parent::$page->get_template('messages/messages_pm_form_view'), $parse));
             break;
         case 'delete':
             if ($to_delete == 'deleteall') {
                 parent::$db->query("DELETE FROM " . MESSAGES . "\n\t\t\t\t\t\t\t\t\t\tWHERE `message_receiver` = '" . $this->_current_user['user_id'] . "';");
             } elseif ($to_delete == 'deletemarked') {
                 foreach ($_POST as $Message => $Answer) {
                     if (preg_match("/delmes/i", $Message) && $Answer == 'on') {
                         $MessId = str_replace("delmes", "", $Message);
                         $MessHere = parent::$db->query_fetch("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . MESSAGES . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `message_id` = '" . (int) $MessId . "' AND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`message_receiver` = '" . $this->_current_user['user_id'] . "';");
                         if ($MessHere) {
                             parent::$db->query("DELETE FROM " . MESSAGES . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `message_id` = '" . (int) $MessId . "';");
                         }
                     }
                 }
             } elseif ($to_delete == 'deleteunmarked') {
                 foreach ($_POST as $Message => $Answer) {
                     $CurMess = preg_match("/showmes/i", $Message);
                     $MessId = str_replace("showmes", "", $Message);
                     $Selected = "delmes" . $MessId;
                     $IsSelected = $_POST[$Selected];
//.........这里部分代码省略.........
开发者ID:rampmaster,项目名称:XG-Proyect-v3.x.x,代码行数:101,代码来源:messages.php

示例4: ally_admin

 /**
  * method ally_admin
  * param
  * return the admin page for someone with an alliance
  */
 private function ally_admin()
 {
     $parse = $this->_lang;
     if ($this->_current_user['user_ally_id'] != 0 && $this->_current_user['user_ally_request'] == 0) {
         $edit = isset($_GET['edit']) ? $_GET['edit'] : NULL;
         switch ($edit) {
             case $edit == 'rights' && $this->have_access($this->_ally['alliance_owner'], $this->permissions['right_hand']) === TRUE:
                 $d = isset($_GET['d']) && is_numeric($_GET['d']) && $_GET['d'] >= 0 ? $_GET['d'] : NULL;
                 $alliance_ranks = unserialize($this->_ally['alliance_ranks']);
                 if (!empty($_POST['newrangname'])) {
                     $name = parent::$db->escape_value(strip_tags($_POST['newrangname']));
                     $alliance_ranks[] = array('name' => $name, 'mails' => 0, 'delete' => 0, 'kick' => 0, 'bewerbungen' => 0, 'administrieren' => 0, 'bewerbungenbearbeiten' => 0, 'memberlist' => 0, 'onlinestatus' => 0, 'rechtehand' => 0);
                     $ranks = serialize($alliance_ranks);
                     parent::$db->query("UPDATE " . ALLIANCE . " SET\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_ranks`='" . $ranks . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `alliance_id` = " . (int) $this->_ally['alliance_id']);
                     $goto = $_SERVER['PHP_SELF'] . "?" . str_replace('&amp;', '&', $_SERVER['QUERY_STRING']);
                     Functions_Lib::redirect($goto);
                 } elseif (isset($_POST['id']) && $_POST['id'] != '' && is_array($_POST['id'])) {
                     $ally_ranks_new = array();
                     foreach ($_POST['id'] as $id) {
                         $name = $alliance_ranks[$id]['name'];
                         $ally_ranks_new[$id]['name'] = $name;
                         $ally_ranks_new[$id]['delete'] = isset($_POST['u' . $id . 'r0']) ? 1 : 0;
                         $ally_ranks_new[$id]['kick'] = isset($_POST['u' . $id . 'r1']) && $this->_ally['alliance_owner'] == $this->_current_user['user_id'] ? 1 : 0;
                         $ally_ranks_new[$id]['bewerbungen'] = isset($_POST['u' . $id . 'r2']) ? 1 : 0;
                         $ally_ranks_new[$id]['memberlist'] = isset($_POST['u' . $id . 'r3']) ? 1 : 0;
                         $ally_ranks_new[$id]['bewerbungenbearbeiten'] = isset($_POST['u' . $id . 'r4']) ? 1 : 0;
                         $ally_ranks_new[$id]['administrieren'] = isset($_POST['u' . $id . 'r5']) ? 1 : 0;
                         $ally_ranks_new[$id]['onlinestatus'] = isset($_POST['u' . $id . 'r6']) ? 1 : 0;
                         $ally_ranks_new[$id]['mails'] = isset($_POST['u' . $id . 'r7']) ? 1 : 0;
                         $ally_ranks_new[$id]['rechtehand'] = isset($_POST['u' . $id . 'r8']) ? 1 : 0;
                     }
                     $ranks = serialize($ally_ranks_new);
                     parent::$db->query("UPDATE " . ALLIANCE . " SET\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_ranks`='" . $ranks . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `alliance_id`= " . $this->_ally['alliance_id']);
                     $goto = $_SERVER['PHP_SELF'] . "?" . str_replace('&amp;', '&', $_SERVER['QUERY_STRING']);
                     Functions_Lib::redirect($goto);
                 } elseif (isset($d) && isset($alliance_ranks[$d])) {
                     unset($alliance_ranks[$d]);
                     $this->_ally['ally_rank'] = serialize($alliance_ranks);
                     parent::$db->query("UPDATE " . ALLIANCE . " SET\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_ranks`='" . $this->_ally['ally_rank'] . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `alliance_id` = " . $this->_ally['alliance_id'] . "");
                 }
                 $i = 0;
                 $list = '';
                 if (count($alliance_ranks) != 0 && $alliance_ranks != '') {
                     foreach ($alliance_ranks as $a => $b) {
                         if ($this->_ally['alliance_owner'] == $this->_current_user['user_id']) {
                             $r1 = "<input type=checkbox name=\"u{$a}r0\"" . ($b['delete'] == 1 ? ' checked="checked"' : '') . ">";
                         } else {
                             $r1 = "<b>-</b>";
                         }
                         $this->_lang['id'] = $a;
                         $this->_lang['r0'] = $b['name'];
                         $this->_lang['delete'] = "<a href=\"game.php?page=alliance&mode=admin&edit=rights&d={$a}\"><img src=\"" . DPATH . "alliance/abort.gif\" border=0></a>";
                         $this->_lang['a'] = $a;
                         $this->_lang['r1'] = $r1;
                         $this->_lang['r2'] = "<input type=checkbox name=\"u{$a}r1\"" . ($b['kick'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r3'] = "<input type=checkbox name=\"u{$a}r2\"" . ($b['bewerbungen'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r4'] = "<input type=checkbox name=\"u{$a}r3\"" . ($b['memberlist'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r5'] = "<input type=checkbox name=\"u{$a}r4\"" . ($b['bewerbungenbearbeiten'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r6'] = "<input type=checkbox name=\"u{$a}r5\"" . ($b['administrieren'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r7'] = "<input type=checkbox name=\"u{$a}r6\"" . ($b['onlinestatus'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r8'] = "<input type=checkbox name=\"u{$a}r7\"" . ($b['mails'] == 1 ? ' checked="checked"' : '') . ">";
                         $this->_lang['r9'] = "<input type=checkbox name=\"u{$a}r8\"" . ($b['rechtehand'] == 1 ? ' checked="checked"' : '') . ">";
                         $list .= parent::$page->parse_template(parent::$page->get_template('alliance/alliance_admin_laws_row'), $this->_lang);
                     }
                 }
                 $this->_lang['list'] = $list;
                 $this->_lang['dpath'] = DPATH;
                 return parent::$page->parse_template(parent::$page->get_template('alliance/alliance_admin_laws'), $this->_lang);
                 break;
             case '':
             case 'ally':
             default:
                 $t = isset($_GET['t']) ? (int) $_GET['t'] : NULL;
                 if ($t != 1 && $t != 2 && $t != 3) {
                     $t = 1;
                 }
                 if ($_POST) {
                     $_POST['owner_range'] = isset($_POST['owner_range']) ? stripslashes($_POST['owner_range']) : '';
                     $_POST['web'] = isset($_POST['web']) ? stripslashes($_POST['web']) : '';
                     $_POST['image'] = isset($_POST['image']) ? stripslashes($_POST['image']) : '';
                     $_POST['text'] = isset($_POST['text']) ? Functions_Lib::format_text($_POST['text']) : '';
                 }
                 if (isset($_POST['options'])) {
                     $this->_ally['alliance_owner_range'] = parent::$db->escape_value(htmlspecialchars(strip_tags($_POST['owner_range'])));
                     $this->_ally['alliance_web'] = parent::$db->escape_value(htmlspecialchars(strip_tags($_POST['web'])));
                     $this->_ally['alliance_image'] = parent::$db->escape_value(htmlspecialchars(strip_tags($_POST['image'])));
                     $this->_ally['alliance_request_notallow'] = (int) $_POST['request_notallow'];
                     if ($this->_ally['alliance_request_notallow'] != 0 && $this->_ally['alliance_request_notallow'] != 1) {
                         Functions_Lib::redirect('game.php?page=alliance?mode=admin&edit=ally');
                     }
                     parent::$db->query("UPDATE " . ALLIANCE . " SET\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_owner_range`='" . $this->_ally['alliance_owner_range'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_image`='" . $this->_ally['alliance_image'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_web`='" . $this->_ally['alliance_web'] . "',\r\n\t\t\t\t\t\t\t\t\t\t\t\t`alliance_request_notallow`='" . $this->_ally['alliance_request_notallow'] . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `alliance_id` = '" . $this->_ally['alliance_id'] . "'");
                 } elseif (isset($_POST['t'])) {
                     if ($t == 3) {
                         $this->_ally['alliance_request'] = $_POST['text'];
                         parent::$db->query("UPDATE " . ALLIANCE . " SET\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t`alliance_request`='" . $this->_ally['alliance_request'] . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `alliance_id` = '" . $this->_ally['alliance_id'] . "'");
//.........这里部分代码省略.........
开发者ID:Gritch69,项目名称:XG-Project,代码行数:101,代码来源:alliance.php


注:本文中的Functions_Lib::format_text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。