public function _initialize() { parent::_initialize(); $this->img_dir = "./data/upload/mall/"; $this->assign('img_dir', $this->img_dir); $this->assign('cate_list', $this->_get_cate_list()); $this->assign('index_list', get_index()); }
function DELETE($api_noun) { global $id, $storage; if ($id !== NULL) { $api = $GLOBALS['api']->{$api_noun}; $data = get_api_data($api_noun); $index = get_index($data, $id); if ($index !== NULL) { array_splice($data, $index, 1); save_file($data); return ""; } else { throw new Exception('Selected item does not exist.', 404); } } throw new Exception('DELETE method must specify which item to delete.', 404); }
<h3>网站服务简介</h3> <div class="user_sroll"> <!-- <ul class="user_list"> <?php /*if(count($user)>0){ foreach ($user as $key => $value) { echo ' <li>'.$value['kq_name'].'<span>刚刚注册了</span></li>'; } }*/ ?> </ul> --> <div class="guirze"> <div id="scrollobj" class="gz_cont"> <?php $zj = get_index($kq_openconfig['zj']); echo $zj['kq_content']; ?> </div> </div> </div> </div> <!-- <div class="part part4"> <img src="images/step.jpg" alt=""> </div> --> </div> </div> <div class="clear_float"></div> </div> <div class="clear_float"></div>
$wordsToSend = substr($wordsToSend, 0, -1); return $wordsToSend; } $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $words = ""; global $flag_q; if (isset($_GET["q"])) { //check for quotes if (mb_substr($_GET["q"], 0, 1) == '"' && mb_substr($_GET["q"], -1) == '"') { $flag_q = true; } $index = get_index(); $results = search_words($_GET["q"], $index); if ($flag_q) { $_GET["q"] = substr($_GET["q"], 1, -1); } $words = getWords($_GET["q"]); } ?> <html> <head> <meta charset="UTF-8"> <title>Search</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <style>
function disable() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } else { $db->query("UPDATE " . PRE . "_banner SET starttime='0',endtime='0' WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); logit('BANNER_DISABLE', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('banner.show')); } } else { list($title) = $db->first("SELECT partner FROM " . PRE . "_banner WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($title)))); tmessageOverlay('disable', array('ID' => $_REQUEST['id'])); } }
function enable() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { $starttime = maketime(1); $endtime = maketime(2); if (!$endtime || $endtime <= $starttime) { $endtime = 3000000000; } $db->query("UPDATE " . PRE . "_poll SET starttime='" . $starttime . "',endtime='" . $endtime . "' WHERE ( id='" . $_REQUEST['id'] . "' ) LIMIT 1"); logit('POLL_ENABLE', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('poll.show')); } else { list($title) = $db->first("SELECT question FROM " . PRE . "_poll WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('ID', $_REQUEST['id']); $apx->tmpl->assign('TITLE', compatible_hsc($title)); $apx->tmpl->assign('STARTTIME', choosetime(1, 0, time())); $apx->tmpl->assign('ENDTIME', choosetime(2, 1)); tmessageOverlay('enable', $input); } }
function quicklink_index($action) { global $quicklink_dump, $apx; if (!$apx->user->has_right($action)) { return; } $quicklink_dump .= iif($quicklink_dump, '<br />') . '» <a href="' . get_index($action) . '">' . $apx->lang->get('TITLE_' . strtoupper(str_replace('.', '_', $action))) . '</a>'; }
</div> </div><!-- gitf_warp --> </div> </div><!-- part --> </div> <div class="part part2"> <div class="wm800"> <div class="guize"> <h3 class="h3">本期赠送礼品规则</h3> <div class="msg"> <?php if ($show_r['kq_guize']) { echo $show_r['kq_guize']; } else { $guize = get_index(6); echo $guize['kq_content']; } ?> </div> <div class="balog"> <dl> <dd> <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"24"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script> </dd> <dd> <?php if (isset($_COOKIE['user'])) { $username = is_login($_COOKIE['uid']);
function disable() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if (!checkToken()) { printInvalidToken(); } else { $db->query("UPDATE " . PRE . "_affiliates SET active='0' WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); logit('AFFILIATES_DISABLE', 'ID #' . $_REQUEST['id']); header('Location: ' . get_index('affiliates.show')); } }
function catclean() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if ($_POST['delcat']) { $nodeInfo = $this->cat->getNode($_REQUEST['id']); if ($nodeInfo['children']) { $_POST['delcat'] = 0; } } if (!checkToken()) { printInvalidToken(); } elseif ($_POST['id'] && $_POST['moveto']) { $db->query("UPDATE " . PRE . "_videos SET catid='" . intval($_POST['moveto']) . "' WHERE catid='" . $_REQUEST['id'] . "'"); logit('VIDEOS_CATCLEAN', "ID #" . $_REQUEST['id']); //Kategorie löschen if ($_POST['delcat']) { $this->cat->deleteNode($_REQUEST['id']); logit('VIDEOS_CATDEL', "ID #" . $_REQUEST['id']); } printJSRedirect(get_index('videos.catshow')); return; } } $data = $this->cat->getTree(array('title', 'open')); if (count($data)) { foreach ($data as $res) { if ($res['level']) { $space = str_repeat(' ', $res['level'] - 1); } if ($res['id'] != $_REQUEST['id'] && $res['open']) { $catlist .= '<option value="' . $res['id'] . '" ' . iif($_POST['moveto'] == $res['id'], ' selected="selected"') . ' style="color:green;">' . $space . replace($res['title']) . '</option>'; } else { $catlist .= '<option value="" disabled="disabled" style="color:grey;">' . $space . replace($res['title']) . '</option>'; } } } list($title, $children) = $db->first("SELECT title,children FROM " . PRE . "_videos_cat WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $children = dash_unserialize($children); $apx->tmpl->assign('ID', $_REQUEST['id']); $apx->tmpl->assign('TITLE', compatible_hsc($title)); $apx->tmpl->assign('DELCAT', (int) $_POST['delcat']); $apx->tmpl->assign('DELETEABLE', !$children); $apx->tmpl->assign('CATLIST', $catlist); tmessageOverlay('catclean'); }
var_dump(isset($a["foo"])); $q =& $a["foo"]; var_dump(isset($a["foo"])); unset($q); var_dump(isset($a["foo"])); } f(); /*********/ function get_index() { echo "I've made a huge mistake\n"; return 0; } $a = 4; $arr = array("get_index should not be called"); var_dump(isset($a, $b, $arr[get_index()])); /** * Check for a peculiar translator interaction with IssetM, where * a dirty, variant local in the same BB as IssetM could cause the * local to morph into a cell. */ function g($dontTake, &$toFillIn, $id, $key, $value) { $toFillIn = array(); if (isset($toFillIn[$id])) { $cur = $toFillIn[$id]; } $toFillIn[$id] = $value; } $a = null; g(null, $a, "127.0.0.1", null, null);
function del() { global $set, $apx, $db; //Mehrere if (is_array($_REQUEST['multiid'])) { if (!checkToken()) { printInvalidToken(); } else { foreach ($_REQUEST['multiid'] as $file) { $file = $this->mm->securefile($file); if ($this->mm->is_protected($file)) { continue; } $this->mm->deletefile($file); logit('MEDIAMANAGER_DEL', $file); } header("HTTP/1.1 301 Moved Permanently"); header('Location: ' . get_index('mediamanager.index')); } } else { if (!$_REQUEST['file']) { die('missing file!'); } if ($this->mm->is_protected($_REQUEST['file'])) { die('this file is protected!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } else { $this->mm->deletefile($_REQUEST['file']); logit('MEDIAMANAGER_DEL', $_REQUEST['file']); printJSRedirect(get_index('mediamanager.index')); } } else { $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($this->mm->getfile($_REQUEST['file']))))); tmessageOverlay('del', array('FILE' => $_REQUEST['file'])); } } }
function get_docs_by_classpath($class, $classpath, $baseInfo) { $title_detail_url_map = get_title_detail_map($class, $classpath); $index_url_map = get_index_url_map($class, $classpath); $docs = array(); $path = "./data/" . $class; $file_list_of_class = $path . "/" . $classpath . ".log"; $tmp = iconv("utf-8", "gb2312//IGNORE", $file_list_of_class); if (!file_exists($tmp)) { echo $file_list_of_class . " NOT FOUND\n"; save("logs/detail_not_found.txt", $path . "\n", "a+"); return $docs; } $fp = fopen($tmp, "r+"); while ($line = readLine($fp)) { if (strlen($line) == 0) { continue; } $arr = explode("\t", $line); $doc = array(); $doc = array_merge($doc, $baseInfo); $title = $doc['title'] = $arr[0]; $doc['author'] = $arr[1]; $doc['school'] = $arr[2]; $doc['degree'] = $arr[3]; $doc['year'] = $arr[4]; $doc['read_url'] = $arr[5]; $doc['abstract_302_url'] = $arr[6]; $c = $doc['code'] = $arr[7]; $doc['status'] = 0; $doc['_id'] = md5($c . $title); $doc['abstract_url'] = @$title_detail_url_map[$title]; $doc = array_merge($doc, get_abstract_by_title($class, $classpath, $title)); //$doc = array_merge($doc, get_index($class, $classpath, $title)); $doc['index'] = get_index($class, $classpath, $title); $doc['index_url'] = isset($index_url_map[$title]) ? $index_url_map[$title] : ""; $doc['ts'] = time(); $docs[] = $doc; } fclose($fp); //exit; return $docs; }
$prev = ""; $i = -1; $j = 0; foreach ($lines as $line) { $col = explode("|", $line); if ($col[2] > 10) { #echo "<pre>"; print_r($col); echo "</pre>"; if ($prev != $col[0]) { $prev = $col[0]; $i++; $j = 0; for ($t = 0; $t < 40; $t++) { $datay[$i][$t] = 0; } } $datay[get_index($col[3])][$i] = $col[2]; $datax[$i] = date("H:j", $col[0]); $j++; } } #echo "<pre>"; print_r($datay); echo "</pre>"; exit; $graph = new Graph(800, 768, "auto"); $graph->SetShadow(); $graph->SetBackgroundGradient('#8e8e8e', '#e1e1e1'); // Use an integer X-scale $graph->SetScale("textlin"); // Set title and subtitle $graph->title->Set("Memory Leaks"); $graph->subtitle->Set("Shows the number of unfreed blocks requested by each module"); // Use built in font $graph->title->SetFont(FF_FONT1, FS_BOLD);
$user->pass = $newPass; if ($id != 0) { $user->img = $img; } $user['id'] = $id; if (write_xml('users', $users)) { echo "PASS||{$usern}||{$img}||{$id}"; } break; case 'DEL_USER': if (check_login($_SESSION, $users) && $_SESSION['uid'] != 0) { echo 'FAIL||You do not have permission to delete users.'; exit; } $id = str_replace($bad, '', $_REQUEST['id']); if (!($idx = get_index((int) $id, $users))) { echo 'FAIL||That user does not exist.'; exit; } if ($id == 0) { echo 'FAIL||You cannot delete the master user once created. If you no longer want multi-user mode enabled, you can turn it off normally.'; exit; } unset($users->user[$idx]); if (write_xml('users', $users)) { echo "PASS||{$id}"; } break; case 'LOGOUT': session_unset(); session_destroy();
} $domain = $_REQUEST['domain']; $offset = $_REQUEST['offset']; $max_results = $_REQUEST['max_results']; $getext = $_REQUEST['getext']; $ignoredir = $_REQUEST['ignoredir']; // check to see whether we know the domain or not if (!isset($domain)) { Header("Location: index.html"); exit; } if (!isset($offset)) { $offset = 0; } $domain = str_replace("http://", "", $domain); $index = get_index($domain); get_links($index, $domain, $links); if (sizeof($links) <= $offset || !sizeof($links)) { setcookie("phpsubmit_remembering", false, time() + 604800); Header("Location: noresults.html"); exit; } ?> <!-- PHPSubmit - A search engine submission script Copyright (C) 2000 Matt Wilson This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or
function dt_index($per = true, $ppp = 10) { $next = isset($_GET['next']) ? $_GET['next'] : 0; global $posts, $options; $post_types = array('post', 'page', 'article', 'training', 'schedule', 'product', 'event'); $categories = get_category(); $type = get_index() == 'type' ? P : 'post'; if (defined('P') && P == 'index.php') { if (in_array($options['main_page'], $post_types)) { $type = $options['main_page']; } elseif (in_array($options['main_page'], $categories)) { $type = $options['main_page']; } } $category = array_key_exists($type, $categories) ? $categories[$type]['post_id'] : array(); if (is_array($posts) && count($posts) > 0) { $hasil = '<div class="dixie-posts">'; $s_hasil = ''; $tposts = $type == 'training' ? generate_training_post($posts) : array_reverse($posts); $rp = 0; foreach ($tposts as $post) { $generate = dt_single_post($post, $type, 39, $category); if ($per && $generate !== '') { $rp++; if ($rp > $next) { $s_hasil .= $generate; } if ($rp == $ppp + $next) { break; } } else { $s_hasil .= $generate; } } if ($s_hasil !== '') { $hasil .= $s_hasil; if ($per && $rp == $ppp + $next) { $hasil .= '<div class="post-navigator"><a href="' . WWW . (get_index() == 'index' ? '' : $type) . '?next=' . ($next + $ppp) . '"><div class="post-navigator-next">Next</div></a></div>'; } } else { $an = array('article', 'event'); $pre = in_array($type, $an) ? 'an' : 'a'; if (array_key_exists($type, $categories)) { $hasil .= '<h2>Doesn\'t have a post yet in category <a href="' . WWW . $type . '">' . ucwords($type) . '</a></h2>'; } elseif ($per && $next > 0) { $hasil .= '<h2>No more <a href="' . WWW . $type . '">' . ucwords($type) . '</a></h2>'; } else { $hasil .= '<h2>Doesn\'t have ' . $pre . ' <a href="' . WWW . $type . '">' . ucwords($type) . '</a> yet</h2>'; } } $hasil .= '</div>'; return $hasil; } else { return false; } }
} else { echo '<input type="submit" name="dbdosubmit" value="' . $lang['L_DO_NOW'] . '" class="Formbutton">'; } break; case "rights": break; } echo '</form></div></div><br>'; } } echo '<br><form action="sql.php?context=3" method="post"><input type="hidden" name="dbwantaction" value="1">'; echo '<div><table class="bdr">'; echo '<tr><td colspan="2" align="center"><strong>' . $lang['L_CREATE_DATABASE'] . '</strong></td></tr>'; echo '<tr><td>Name:</td><td><input type="text" class="text" name="db_create" size="20"></td></tr>'; echo '<tr><td>' . $lang['L_DEFAULT_CHARSET'] . ':</td><td><select name="db_default_charset">'; echo make_options($config['mysql_possible_character_sets'], get_index($config['mysql_possible_character_sets'], $config['mysql_standard_character_set'])); echo '</select></td></tr>'; echo '<tr><td>' . $lang['L_COLLATION'] . '</td><td><select name="db_collate">' . CollationCombo('', 1) . '</select></td></tr>'; echo '<tr><td colspan="2"><input type="submit" name="db_createnew" value="' . $lang['L_CREATE'] . '" class="Formbutton"></td></tr>'; echo '</table>'; echo '<br><table class="bdr">'; echo '<tr class="thead"><th>' . $lang['L_DBS'] . '</th><th>' . $lang['L_SQL_ACTIONS'] . '</th></tr>'; for ($i = 0; $i < count($databases['Name']); $i++) { $cl = $i % 2 ? "dbrow" : "dbrow1"; echo $i == $databases['db_selected_index'] ? '<tr class="dbrowsel">' : '<tr class="' . $cl . '">'; echo '<td><a href="sql.php?db=' . $databases['Name'][$i] . '&dbid=' . $i . '">' . $databases['Name'][$i] . '</a></td>'; echo '<td nowrap="nowrap"><input type="text" class="text" name="db_rename' . $i . '" size="20">'; echo ' <select name="db_do_action_' . $i . '" onchange="db_do_' . $i . '.disabled=false;">'; echo '<option value="">-- ' . $lang['L_SQL_CHOOSEACTION'] . ' --</option>'; echo '<option value="drop">' . $lang['L_SQL_DELETEDB'] . '</option>'; echo '<option value="empty">' . $lang['L_SQL_EMPTYDB'] . '</option>';
$kq_phone = $get_config_array['kq_phone']; $kq_qq = $get_config_array['kq_qq']; $kq_email = $get_config_array['kq_email']; $kq_address = $get_config_array['kq_address']; $kq_fax = $get_config_array['kq_fax']; $kq_youbian = $get_config_array['kq_youbian']; $kq_youlink = $get_config_array['kq_link']; $kq_icp = $get_config_array['kq_icp']; //ICP $kq_ip = explode(",", $get_config_array['kq_closedip']); //限制IP $kq_close = $get_config_array['kq_closed']; //关闭 $kq_tongji = $get_config_array['kq_tongji']; //统计 $kq_wjt = $get_config_array['kq_rewrite']; $kq_telname = $get_config_array['kq_telname']; $kq_openconfig = $get_config_array['kq_openconfig']; $kq_openconfig = json_decode($kq_openconfig, true); $kq_number = $get_config_array['kq_number']; //客户端信息 $customer_ip = $_SERVER['REMOTE_ADDR']; $rand = rand(0, 1); $pagesub = 5; $pagesize = 16; $index = ''; $ontime = time(); $wxthumbs = get_index($kq_openconfig['wx']); $wxpic = $wxthumbs['kq_thumbs']; $wxpic = json_decode($wxpic); $navname = 'index';
echo "object_id,metric,end_time,period,value\n"; foreach ($insights['data'] as $metric) { foreach ($metric['values'] as $row) { $split = explode('/', $metric['id']); $date_str = explode('T', $row['end_time']); $date = new DateTime($date_str[0]); $date->modify('-1 day'); $value = $row['value']; if (is_array($row['value'])) { $value = implode(' ', $row['value']); } echo "{$split[0]},{$metric['name']},{$date->format('Y-m-d')}," . "{$metric['period']},{$value}\n"; } } } else { $profiles = get_index($token); // Render the index. ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <title>Facebook Insights API Sample Application</title> </head> <body> <form action="results.php" method="get"> <div> <?php
function disable() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if (!checkToken()) { printInvalidToken(); } else { $db->query("UPDATE " . PRE . "_content SET active='0' WHERE ( id='" . $_REQUEST['id'] . "' " . iif(!$apx->user->has_spright('content.disable'), " AND userid='" . $apx->user->info['userid'] . "'") . " ) LIMIT 1"); logit('CONTENT_DISABLE', 'ID #' . $_REQUEST['id']); header("HTTP/1.1 301 Moved Permanently"); header('Location: ' . get_index('content.show')); } }
function systems_del() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } else { $db->query("DELETE FROM " . PRE . "_products_groups WHERE grouptype='system' AND id='" . $_REQUEST['id'] . "'"); logit('PRODUCTS_SYSTEMS_DEL', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('products.systems')); } } else { list($title) = $db->first("SELECT title FROM " . PRE . "_products_groups WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('MESSAGE', $apx->lang->get('DEL_TEXT', array('TITLE' => compatible_hsc($title)))); tmessageOverlay('sysdel', array('ID' => $_REQUEST['id'])); } }
if ($config['auto_delete'] == 1) { $msg = AutoDelete(); } get_sql_encodings(); // get possible sql charsets and also get default charset //0=Datenbank 1=Struktur $action = isset($_GET['action']) ? $_GET['action'] : 'files'; $kind = isset($_GET['kind']) ? $_GET['kind'] : 0; $expand = isset($_GET['expand']) ? $_GET['expand'] : -1; $selectfile = isset($_POST['selectfile']) ? $_POST['selectfile'] : ""; $destfile = isset($_POST['destfile']) ? $_POST['destfile'] : ""; $compressed = isset($_POST['compressed']) ? $_POST['compressed'] : ""; $dk = isset($_POST['dumpKommentar']) ? get_magic_quotes_gpc() ? stripslashes($_POST['dumpKommentar']) : $_POST['dumpKommentar'] : ""; $dk = str_replace(':', '|', $dk); // remove : because of statusline $dump['sel_dump_encoding'] = isset($_POST['sel_dump_encoding']) ? $_POST['sel_dump_encoding'] : get_index($config['mysql_possible_character_sets'], $config['mysql_standard_character_set']); $dump['dump_encoding'] = isset($config['mysql_possible_character_sets'][$dump['sel_dump_encoding']]) ? $config['mysql_possible_character_sets'][$dump['sel_dump_encoding']] : 0; if ($action == 'dl') { // Download of a backup file wanted $file = './' . $config['paths']['backup'] . urldecode($_GET['f']); if (is_readable($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . (string) filesize($file)); flush(); $file = fopen($file, "rb");
function disable() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if (!checkToken()) { printInvalidToken(); } else { //Kindknoten ebenfalls deaktivieren $cattree = $this->cat->getChildrenIds($_REQUEST['id']); $cattree[] = $_REQUEST['id']; $db->query("UPDATE " . PRE . "_faq SET starttime='0' WHERE id IN (" . implode(', ', $cattree) . ")"); foreach ($cattree as $catid) { logit('FAQ_DISABLE', 'ID #' . $catid); } header("HTTP/1.1 301 Moved Permanently"); header('Location: ' . get_index('faq.show')); } }
function ranks_del() { global $set, $apx, $db; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } $apx->lang->dropaction('forum', 'ranks_del'); if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } else { $db->query("DELETE FROM " . PRE . "_forum_ranks WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); logit('FORUM_RANKDEL', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('forum.ranks')); } } else { list($title) = $db->first("SELECT title FROM " . PRE . "_forum_ranks WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($title)))); tmessageOverlay('rankdel', array('ID' => $_REQUEST['id'])); } }
function del() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } else { $db->query("DELETE FROM " . PRE . "_contact WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); logit('CONTACT_DEL', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('contact.show')); } } else { list($title) = $db->first("SELECT title FROM " . PRE . "_contact WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('MESSAGE', $apx->lang->get('MSG_TEXT', array('TITLE' => compatible_hsc($title)))); tmessageOverlay('deltitle', array('ID' => $_REQUEST['id']), '/'); } }
function gclean() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } elseif ($_POST['moveto']) { $db->query("UPDATE " . PRE . "_user SET groupid='" . intval($_POST['moveto']) . "' WHERE groupid='" . $_REQUEST['id'] . "'"); logit('USER_GCLEAN', "ID #" . $_REQUEST['id']); //Kategorie löschen if ($_POST['delgroup'] && $_REQUEST['id'] > 3) { $db->query("DELETE FROM " . PRE . "_user_groups WHERE groupid='" . $_REQUEST['id'] . "' LIMIT 1"); logit('USER_GDEL', "ID #" . $_REQUEST['id']); } printJSRedirect(get_index('user.gshow')); return; } } //Andere Gruppen auflisten $data = $db->fetch("SELECT groupid,name FROM " . PRE . "_user_groups WHERE groupid!='" . $_REQUEST['id'] . "' ORDER BY name ASC"); if (count($data)) { foreach ($data as $res) { $grouplist .= '<option value="' . $res['groupid'] . '" ' . iif($_POST['moveto'] == $res['groupid'], ' selected="selected"') . '>' . replace($res['name']) . '</option>'; } } list($title) = $db->first("SELECT username FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('ID', $_REQUEST['id']); $apx->tmpl->assign('TITLE', compatible_hsc($title)); $apx->tmpl->assign('DELGROUP', (int) $_POST['delgroup']); $apx->tmpl->assign('GROUPLIST', $grouplist); $apx->tmpl->assign('DELETEABLE', $_REQUEST['id'] > 3); tmessageOverlay('gclean'); }
<div id="top"> <div class="wm1000 top_warp"> <div class="left_float left"> <span class="time"> </span> </div> <div class="right_float right"> <ul> <li class="lll">浏览量: <span class="c_fd3"><?php echo $kq_number; ?> </span> </li> <li class="qq"><a href="http://wpa.qq.com/msgrd?v=3&uin=<?php $qqstr = get_index($kq_openconfig['qq']); echo $qqstr['kq_code']; ?> &site=qq&menu=yes" target="_blank"><span class="iconfont"></span>客服QQ</a></li> <li class="wx"><a href="javascript:void(0)"><span class="iconfont"></span>微信公众号</a><div class="wx_img"> <img src="<?php echo pic_url($wxpic[0]); ?> " alt="关注微信公众号"> </div></li> <!-- <li class="hy"> <?php if (isset($_COOKIE['uid'])) { echo '<a href="user.html">'; } else { echo '<a href="login.php">';
function com() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } $res = $db->first("SELECT b.username,a.com_text FROM " . PRE . "_guestbook AS a LEFT JOIN " . PRE . "_user AS b ON a.com_userid=b.userid WHERE a.id='" . $_REQUEST['id'] . "' LIMIT 1"); if ($_POST['send'] == 1) { if (!checkToken()) { infoInvalidToken(); } elseif (!$_POST['id'] || !$_POST['text'] && !$_POST['delcom']) { infoNotComplete(); } else { if ($_POST['delcom']) { $db->query("UPDATE " . PRE . "_guestbook SET com_userid='',com_text='',com_time='' WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); } else { $db->query("UPDATE " . PRE . "_guestbook SET com_userid=IF(com_userid,com_userid,'" . $apx->user->info['userid'] . "'),com_text='" . addslashes($_POST['text']) . "',com_time=IF(com_time,com_time,'" . time() . "') WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); } logit('GUESTBOOK_COM', 'ID #' . $_REQUEST['id']); printJSRedirect(get_index('guestbook.show')); } } else { $_POST['text'] = $res['com_text']; if ($res['username']) { $username = $res['username']; } else { $username = $apx->user->info['username']; } $apx->tmpl->assign('ID', $_REQUEST['id']); $apx->tmpl->assign('USERNAME', compatible_hsc($username)); $apx->tmpl->assign('TEXT', compatible_hsc($_POST['text'])); $apx->tmpl->assign('DELCOM', (int) $_POST['delcom']); $apx->tmpl->parse('com'); } }
function catclean() { global $set, $db, $apx; $_REQUEST['id'] = (int) $_REQUEST['id']; if (!$_REQUEST['id']) { die('missing ID!'); } if ($_POST['send'] == 1) { if (!checkToken()) { printInvalidToken(); } elseif ($_POST['id'] && $_POST['moveto']) { $db->query("UPDATE " . PRE . "_glossar SET catid='" . intval($_POST['moveto']) . "' WHERE catid='" . $_REQUEST['id'] . "'"); logit('GLOSSAR_CATCLEAN', "ID #" . $_REQUEST['id']); //Kategorie löschen if ($_POST['delcat']) { $db->query("DELETE FROM " . PRE . "_glossar_cat WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); logit('GLOSSAR_CATDEL', "ID #" . $_REQUEST['id']); } printJSRedirect(get_index('glossar.catshow')); return; } } //Andere Kategorien auflisten $data = $db->fetch("SELECT id,title FROM " . PRE . "_glossar_cat WHERE id!='" . $_REQUEST['id'] . "' ORDER BY title ASC"); if (count($data)) { foreach ($data as $res) { $catlist .= '<option value="' . $res['id'] . '" ' . iif($_POST['moveto'] == $res['id'], ' selected="selected"') . '>' . replace($res['title']) . '</option>'; } } list($title) = $db->first("SELECT title FROM " . PRE . "_glossar_cat WHERE id='" . $_REQUEST['id'] . "' LIMIT 1"); $apx->tmpl->assign('TITLE', compatible_hsc($title)); $apx->tmpl->assign('ID', $_REQUEST['id']); $apx->tmpl->assign('DELCAT', (int) $_POST['delcat']); $apx->tmpl->assign('CATLIST', $catlist); tmessageOverlay('catclean'); }