/** * 大学列表 */ public function universityAction() { echo 11; $infoIns = new \User\InfoModel(); $info = $infoIns->getList(); de($info); }
public function __call($function, $args) { $re = '/(' . join('|', array_keys(array_map('preg_quote', $this->_queryTypes))) . ')(.+?)(?:By(.+))*$/'; if (preg_match($re, $function, $matches)) { $queryType = $matches[1]; if (isset($this->_queryTypes[$queryType])) { $temp = str_split($matches[2]); $temp[0] = strtolower($temp[0]); $method_names = array('_' . $queryType . $matches[2] . 'Query', '_' . join($temp) . 'Query'); $queryMethod = $this->_queryTypes[$queryType]; if (isset($matches[3])) { array_unshift($method_names, '_' . $queryType . $matches[2] . 'ByQuery'); if (Zend_Version::compareVersion('1.7.9') < 0) { $filter = new Zend_Filter_Word_CamelCaseToUnderscore(); $field = strtolower($filter->filter($matches[3])); } else { $field = strtolower(Zend_Filter::filterStatic($matches[3], 'Word_CamelCaseToUnderscore')); } array_unshift($args, $field); } foreach ($method_names as $method) { if (method_exists($this, $method)) { $sql = call_user_func_array(array($this, $method), $args); return $this->{$queryMethod}($sql); break; } } die("Cannot find proper query method for function <b>" . $function . "</b> of class " . get_class($this)); } } de('Table.php: ', $function, $args); return parent::__call($function, $args); }
/** * 查看用户主页 */ public function showAction() { $userIns = new User(2); de(1); $user_id = (int) $this->getRequest()->getParam('id'); echo sprintf('正在查看%d用户的个人主页', $user_id); }
public function indexAction() { // $admin = session('admin'); $cookie_admin = cookie('admin_cookie'); de($cookie_admin); \Art\InfoModel::getInfo(); \User\InfoModel::getInfo(); }
/** * 查看个人财务信息 */ public function showAction() { $id = $this->getRequest()->getParam('id', 0); $type = $this->getRequest()->getParam('type', 0); echo $type; de($id); echo 'my account'; }
/** * 注册操作 */ public function postRegistryAction() { if (!IS_POST) { de('404'); } $username = $this->getRequest()->getParam('uname', ''); $password = $this->getRequest()->getParam('pwd', ''); $bo = \User\Register::add($username, $password); if ($bo['code'] > 0) { de('注册成功!'); } de('注册失败!'); }
public function indexAction() { $user = '******'; $pwd = '123123'; $infoIns = new \User\InfoModel(); $info = $infoIns->username($user); if (empty($info)) { de('用户不存在'); } $pwd = md5($pwd . $info['pwd_sec']); if ($pwd != $info['password']) { de('密码不对'); } unset($info['password']); $_SESSION['user'] = $info; de($_SESSION); }
<?php header("Content-type: text/html; charset=utf-8"); #逻辑处理文件 echo $type = intval($_GET['type']); switch ($type) { case 1: $info = caocan(); break; default: $info = de(); } function de() { return '默认'; } function caocan() { return '早餐'; } ?> <html> <head> <title><?php echo $info; ?> </title> </head>
@extends('layout') @section('content') <?php /** * @var \destiny\Player $player * @var \destiny\Character $character */ de($character->inventory); ?> <?php echo d($character->toArray()); ?> @stop
if ($_GET['text'] != "" && $OTHER["shut"] < time()) { $text = AddSlashes(HtmlSpecialChars($_GET['text'])); $text = str_replace("&", "&", $text); if ($OTHER["clan"] == "") { $text = str_replace("clan [", "<b style=color:#ff0000>«јѕ–≈ў≈ЌЌџ≈ —Ћќ¬ј</b>", $text); } if ($OTHER["level"] == 0) { $text = str_replace("private", "to", $text); } $tmp_text = str_replace($flood, "", $text); if ($tmp_text != $text) { $text = "<b style=color:#ff0000>«јѕ–≈ў≈ЌЌџ≈ —Ћќ¬ј</b>"; if (!$OTHER["admin_level"] && !$OTHER["dealer"]) { $time2 = time() + 1800; mysql_query("UPDATE users SET shut='" . $time2 . "',shut_reason='»спользование ненормативной лексики в чате' WHERE login='******'"); de("toall", "јвтоматически наложено заклинани¤ молчани¤ на персонажа <b>"" . $my_login . ""</b> на 30 мин. <b>ѕричина:</b> <i>»спользование ненормативной лексики в чате.</i>", $my_login, $OTHER["room"], $OTHER["city_game"]); } } $text = wordwrap(trim($text), 100, " ", 1); #if ($OTHER["adminsite"])$text="<b>".$text."</b>"; $fopen_chat = fopen($chat_base, "a"); fwrite($fopen_chat, "::" . $micro . "::" . $my_login . "::" . $OTHER["color"] . "::" . $text . "::" . $OTHER["room"] . "::" . $OTHER["city_game"] . "::\n"); fclose($fopen_chat); //-------------archive--------------- $baza_name = date("dmY"); $fopen_chat = fopen("data/" . $baza_name, "a"); fwrite($fopen_chat, "::" . $micro . "::" . $my_login . "::" . $OTHER["color"] . "::" . $text . "::" . $OTHER["room"] . "::" . $OTHER["city_game"] . "::\n"); fclose($fopen_chat); //---------------------------- echo "<SCRIPT> top.CLR1(); </SCRIPT>"; }
<?php // 既可以函数方式调用也可以 类方法调用 // 如: d() de() p() pe() Po::d() Po::de() Po::p() Po::pe() include_once realpath(__DIR__ . '/..') . '/functions.php'; //也可只加载 Po.php 这时候仅可以用 类方法调用 如: Po::d() Po::de() Po::p() Po::pe() // include_once realpath(__DIR__.'/..').'/Po.php'; $d = array(false, true, null, 234, 34.67, 'werfdfdfdf' => 'werfdfdfdf', 'yyyyyyyy' => array('ttttttttttttt', 'yyyyyyyyyyyyy', 'kkkkkkkkkkkk' => array('uuuuuuuuuu', 1323))); $j = json_encode($d); $o = json_decode($j); // \Po::hidden(); d('wwwwwwwwww', 23453545, $d, $o); p('wwwwwwwwww', 23453545, $d, $o); pr('ddddddddd', 23453545, $d, $o); vd('ddddddddd', 23453545, $d, $o); pe('ddddddddd', 23453545, $d, $o); // 会退出 de($_SERVER); // 会退出
function decm($class) { de(get_class_methods($class)); }
if (!$fp) { echo "Open failed!"; exit; } if (isset($_REQUEST['cmd'])) { de("cmd is set"); foreach ($_REQUEST['cmd'] as $c) { de($c); $command[] = $c; } } else { de("cmd is not set"); $command[] = "q"; // status } de("size of array: " . count($command)); //stream_set_blocking($fp, false); // now loop through the commands and execute them, then push the returned text into an array // //while (true) //{ foreach ($command as $c) { // execute the command fwrite($fp, $c); if (in_array($c, $oneSecondCommands)) { sleep(1); } else { if (in_array($c, $fiveSecondCommands)) { sleep(5); } }
/** * Short form function for dumping all queries that are run up to the point it is called, and then * quitting execution * * @return \Message\Cog\Debug\Dumper The variable dumper */ function deQueries() { return de(\Message\Cog\Service\Container::get('db.connection')->getQueryList()); }
/** * 获取对外展示的数组,暂时先不写,根据需要再写 */ public function show() { de($this->info); }
function proc($s) { if ($_POST['processs'] == 'en') { $bat = explode(",", $_POST['batch2']); for ($i = 0; $i < count($bat); ++$i) { list($a, $m) = explode("-", $bat[$i]); if (trim($a) == "e") { $s = en(trim($m), $s); } if (trim($a) == "d") { $s = de(trim($m), $s); } } } if ($_POST['processs'] == 'de') { $bat = explode(",", $_POST['batch2']); for ($i = count($bat) - 1; $i >= 0; $i--) { list($a, $m) = explode("-", $bat[$i]); if (trim($a) == "e") { $s = de(trim($m), $s); } if (trim($a) == "d") { $s = en(trim($m), $s); } } } return $s; }