public function index() { $jsonUlist = ''; //用户 $isAdmin = false; if (session('pcAdmin')) { $xml = readXml('pcAdmin'); $this->userInfo = session('pcAdmin'); if (!$xml || strval($xml->signCut) !== strval($this->userInfo['signCut'])) { session(null); } else { $isAdmin = true; } } //获取抽奖人数 $winnerTotal = M('reward')->where('statu=1 AND is_show=1 AND choosetime>0')->count('id'); //已中奖人数 $notTotal = M('user')->where('mobile<>\'\' AND isjoin=0 AND is_staff=2')->count('id'); //不允许抽红包的总人数 //获取奖项 $prize = M('prize')->select(); //获取用户 $jsonUlist = getAllUserToJson(); //10<$userLen && $userLen = '<i>'.substr($userLen,0,1).'</i>'.substr($userLen,1); $this->assign('pcAdmin', $isAdmin); $this->assign('winnerTotal', $winnerTotal); $this->assign('notTotal', $notTotal); $this->assign('jsonUlist', $jsonUlist); $this->assign('prize', $prize); $this->display(); }
private function issignin() { !session('pcAdmin') && exit('{"state":false,"msg":"你必须登录"}'); $this->userInfo = session('pcAdmin'); $xml = readXml('pcAdmin'); if (!$xml || strval($xml->signCut) !== strval($this->userInfo['signCut'])) { session(null); exit('{"state":false,"msg":"帐号已经在其它地方登录"}'); } }
function checkInMenu($pg_title) { $location = $global_site['folder'] . 'pages/data/menu_tabs'; $menu_tabs = readXml($location); $key = array_search($pg_title, $menu_tabs); if ($key) { return "checked='checked'"; } else { return ' '; } }
$data_config['url'] = $_POST['url']; xmlWrite($data_config, $locatn); ?> <script type="text/javascript"> success ="Details Successfully Updated!."; showErrorSuccess(); </script> <div id="redirecthome"> <a href="admin_home.php">Go to Admin Home page</a> </div> <?php } } else { $locatn = $global_admin['folder'] . 'data/admin_config'; $config_data = readXml($locatn); ?> <form action="admin_home.php" method="post" id="id-form"> <div> <table border="0" cellpadding="0" cellspacing="0" id="id-form"> <tr> <th valign="top">Website Name:</th> <td><input type='text' name='site_name' value='<?php echo $config_data['site_name']; ?> 'class="inp-form" onblur="validate_site_name()"/> </td> <td></td> </tr> <tr>
$msg = "Sorry there was an error uploading your file."; } elseif ($_GET["theme"] == "Exists") { $msg = "Theme already exists"; } } $locatn = $global_site['folder'] . 'themes'; $dir = $locatn; $themelist = scandir($dir); $theme_list = array(); foreach ($themelist as $key => $value) { if (stristr($value, '.', false) == false) { array_push($theme_list, $themelist[$key]); } } $locatn = $global_admin['folder'] . 'data/admin_config'; $data = readXml($locatn); echo '<p align="center">' . $msg . '</p>'; echo '<p align="center">Your current theme is - ' . $data['theme'] . '</p>'; ?> <form name="themefrm" method="post" action="theme_manager.php"> <table align="center" border="1"> <tr> <td> <select name="thm" id="themes" size="1" onchange="chngimg()"> <?php $i = 0; while ($i < count($theme_list)) {
echo $pg_data['pg_contents']; ?> </textarea></td> </tr> <tr><td> <input type="button" name="selectPanel" value="Select Panel"></input></td></tr> </table> </form> <?php } else { if (isset($_POST) && $_POST != NULL || file_exists('C:/wamp/www/tigercms/pages/data/panel.xml')) { $location = "C:/wamp/www/tigercms/pages/data/panel"; xmlWrite($_POST, $location); $pg_data = readXml($location); $chk = $pg_data['panelRadio']; ?> <form action="panel.php" method="post"> <table> <tr> <td>Position:</td> <td> <input type="radio" name="panelRadio" value="leftPanel" <?php if ($chk == "leftPanel") { ?> checked="checked"<?php } ?> />Left Panel <input type="radio" name="panelRadio" value="rightPanel" <?php
header('Location:menu_manager.php'); } else { ?> <div class="MenuTabs"> <form name="Headers" method="post" action="menu_manager.php"> <table align="center" border="0"> <tr> <td>Order</td> <td align="center">Menu Name</td> <td align="center">Delete</td> </tr> <tr> <td><ul id="sort" style="list-style-type:none;"> <?php $m_list = readXml('C:\\wamp\\www\\tigercms\\pages\\data\\menu_tabs'); //Location here $i = 1; while ($i <= count($m_list)) { echo '<li>' . $i . '</li>'; $i++; } ?> </ul></td> <td> <ul id="sortable"> <?php $i = 1; while ($i <= count($m_list)) { echo "<li class=\"ui-state-default\">  <input type=\"hidden\" name=\"m[]\" value=\"" . $m_list["tab" . $i] . "\" />" . $m_list['tab' . $i] . "</li>"; $i++;