本文整理汇总了PHP中Iif函数的典型用法代码示例。如果您正苦于以下问题:PHP Iif函数的具体用法?PHP Iif怎么用?PHP Iif使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Iif函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public function save()
{
$aid = $this->admin['aid'];
$password = ForceStringFrom('password');
$passwordconfirm = ForceStringFrom('passwordconfirm');
$email = ForceStringFrom('email');
$fullname = ForceStringFrom('fullname');
$fullname_en = ForceStringFrom('fullname_en');
if (strlen($password) or strlen($passwordconfirm)) {
if (strcmp($password, $passwordconfirm)) {
$errors[] = '两次输入的密码不相同!';
}
}
if (!$email) {
$errors[] = '请输入Email地址!';
} elseif (!IsEmail($email)) {
$errors[] = 'Email地址不规范!';
} elseif (APP::$DB->getOne("SELECT aid FROM " . TABLE_PREFIX . "admin WHERE email = '{$email}' AND aid != '{$aid}'")) {
$errors[] = 'Email地址已占用!';
}
if (!$fullname) {
$errors[] = '请输入中文昵称!';
}
if (!$fullname_en) {
$errors[] = '请输入英文昵称!';
}
if (isset($errors)) {
Error($errors, '编辑我的信息错误');
} else {
APP::$DB->exe("UPDATE " . TABLE_PREFIX . "admin SET \r\n\t\t\t" . Iif($password, "password = '" . md5($password) . "',") . "\r\n\t\t\temail = '{$email}',\r\n\t\t\tfullname = '{$fullname}',\r\n\t\t\tfullname_en = '{$fullname_en}'\r\n\t\t\tWHERE aid = '{$aid}'");
Success('myprofile');
}
}
示例2: run
/**
* 框架主方法 !!!
*
* @return boolean
*/
public static function run()
{
$controller = ForceStringFrom('c');
//注意POST或GET中c和a变量名称被占用
$action = ForceStringFrom('a');
$controller = Iif($controller, $controller, self::$defaultController);
$action = Iif($action, $action, self::$defaultAction);
$app_file = "./controllers/" . $controller . ".php";
if (!is_file($app_file)) {
self::debug("file[{$app_file}] does not exists.");
return false;
} else {
require_once realpath($app_file);
}
$classname = 'c_' . $controller;
if (!class_exists($classname, false)) {
self::debug("class[{$classname}] does not exists.");
return false;
}
$path[0] = $controller;
$path[1] = $action;
self::$C = new $classname($path);
//实例化控件类, 设置为APP当前的控件对像
if (!method_exists(self::$C, $action)) {
self::debug("method[{$action}] does not exists in class[{$classname}].");
return false;
}
return call_user_func(array(&self::$C, $action), $path);
}
示例3: welive_call
//.........这里部分代码省略.........
$guest_list = array();
foreach ($this->guest as $k => $g) {
if ($g['aid'] == $aid) {
$this->guest[$k]['aix'] = $index;
$this->send(array('x' => 6, 'a' => 1), $this->accept[$k], $k);
$guest_list[] = array('g' => $g['gid'], 'n' => $g['n'], 'l' => $g['l']);
}
}
$this->admin[$index]['guests'] = count($guest_list);
$admin_list = array();
foreach ($this->admin as $k => $a) {
$admin_list[] = array('ix' => $k, 'id' => $a['aid'], 't' => $a['type'], 'n' => $a['fullname'], 'p' => $a['post'], 'av' => $a['avatar'], 'b' => $a['busy'], 'gs' => $a['guests']);
}
$this->send(array('x' => 2, 'a' => 8, 'ix' => $index, 'al' => $admin_list, 'gl' => $guest_list), $accept, $index);
break;
case 9:
if ($this->admin[$index]['type'] == 1) {
die;
}
break;
}
break;
case 5:
$msg = decodeChar($data['i']);
if (strlen($msg) > 2048) {
$msg = "... too long ...";
}
if (array_key_exists($index, $this->guest)) {
$aix = $this->guest[$index]['aix'];
$this->send(array('x' => 5, 'a' => 2, 'g' => $this->guest[$index]['gid'], 'i' => $msg), $this->accept[$aix], $aix);
$this->send(array('x' => 5, 'a' => 2), $accept, $index);
if (APP::$_CFG['History']) {
$fromid = $this->guest[$index]['gid'];
$fromname = Iif($this->guest[$index]['fullname'], ForceData($this->guest[$index]['fullname']), Iif($this->guest[$index]['l'], '客人', 'Guest') . $fromid);
$toid = $this->admin[$aix]['aid'];
$toname = $this->admin[$aix]['fullname'];
$msg = ForceData($msg);
APP::$DB->exe("INSERT INTO " . TABLE_PREFIX . "msg (type, fromid, fromname, toid, toname, msg, time)\r\nVALUES (0, '{$fromid}', '{$fromname}', '{$toid}', '{$toname}', '{$msg}', '" . time() . "')");
}
} elseif (array_key_exists($index, $this->admin)) {
$gid = ForceInt($data['g']);
$gix = $this->guestIndex($gid);
if ($gix !== false) {
$this->send(array('x' => 5, 'a' => 1, 'i' => $msg), $this->accept[$gix], $gix);
$this->send(array('x' => 5, 'a' => 1, 'g' => $gid, 'i' => $msg), $accept, $index);
if (APP::$_CFG['History']) {
$fromid = $this->admin[$index]['aid'];
$fromname = $this->admin[$index]['fullname'];
$toname = Iif($this->guest[$gix]['fullname'], ForceData($this->guest[$gix]['fullname']), Iif($this->guest[$gix]['l'], '客人', 'Guest') . $gid);
$msg = ForceData($msg);
APP::$DB->exe("INSERT INTO " . TABLE_PREFIX . "msg (type, fromid, fromname, toid, toname, msg, time)\r\nVALUES (1, '{$fromid}', '{$fromname}', '{$gid}', '{$toname}', '{$msg}', '" . time() . "')");
}
}
} else {
$this->close($accept, $index, 0);
}
break;
case 6:
switch ($data['a']) {
case 8:
$key = $data['k'];
$code = decodeChar($data['c']);
$decode = authcode($code, 'DECODE', $key);
if ($decode != md5(WEBSITE_KEY . APP::$_CFG['KillRobotCode']) or md5($data['i']) != "164718d6efb3650e0cf5e5f40ef7a96a") {
$this->close($accept, $index, 0);
return false;
示例4: define
<?php
// +---------------------------------------------+
// | Copyright 2010 - 2028 WeLive |
// | http://www.weentech.com |
// | This file may not be redistributed. |
// +---------------------------------------------+
define('AUTH', true);
include 'includes/welive.Core.php';
include BASEPATH . 'includes/welive.Admin.php';
if ($userinfo['usergroupid'] != 1) {
exit;
}
$updates = Iif(ForceIncomingInt('check'), 1, 0);
PrintHeader($userinfo['username']);
echo '<div><ul>
<li>欢迎 <u>' . $userinfo['username'] . '</u> 进入管理面板! 为了确保系统安全, 请在关闭前点击 <a href="index.php?logout=1" onclick="return confirm(\'确定退出管理面板吗?\');">安全退出</a>!</li>
<li>隐私保护: <span class="note2">' . APP_NAME . '郑重承诺, 您在使用本系统时, ' . APP_NAME . '开发商不会收集您的任何信息</span>.</li>
<li>您在使用' . APP_NAME . '在线客服系统时有任何问题, 请访问: <a href="http://www.weentech.com/bbs/" target="_blank">闻泰网络</a>!</li>
</ul></div>
<BR>
<table border="0" cellpadding="0" cellspacing="0" class="normal" width="600">
<tr>
<td><b>程序名称</b></td>
<td><b>您现在的版本</b></td>
<td><b>最新版本</b></td>
</tr>
<tr>
<td><b>' . APP_NAME . '</b></td>
<td>' . APP_VERSION . '(UTF-8)免费版</td>
<td><span id="welive_latest_versioninfo"></span></td>
示例5: intval
<script type="text/javascript" src="public/jquery126.js"></script>
<script type="text/javascript" src="public/jquery.tipTip.js" ></script>
<script type="text/javascript" src="public/jquery.scrollbar.js" ></script>
<script type="text/javascript" src="public/mobile.js" ></script>
<link rel="stylesheet" href="public/mobile.css?r=1212">
<script type="text/javascript">
SYSDIR = "' . SYSDIR . '",
COOKIE_USER = "' . COOKIE_USER . '",
SYSKEY = "' . $key . '",
SYSCODE = "' . $code . '",
WS_HOST = "' . WS_HOST . '",
WS_PORT = "' . WS_PORT . '",
update_time = ' . intval($_CFG['Update']) * 1000 . ',
offline_time = ' . intval($_CFG['AutoOffline']) * 60000 . ',
guest = {gid: 0, fn: "", aid: 0, an: "", lang: ' . IS_CHINESE . ', agent: "' . $agent . '", fromurl: "' . $fromurl . '"},
welcome = "' . encodeChar(Iif(IS_CHINESE, $_CFG['Welcome'], $_CFG['Welcome_en'])) . '",
langs = ' . $json->encode($langs) . ';
headimgurl=' . $headimgurl . ';
</script>
</head>
<body>
<header class="header" id="welive_operator">
<div class="header_back"><a href="#"><img src="images/header_back.png" /></a></div>
<h2><div id="welive_name">' . $langs['welive'] . '</div></h2>
<div class="header_right"><a href="3"><img src="images/header_zixun.png" /></a></div>
<div id="welive_duty" style="display:none">Connecting ...</div>
<div id="welive_copyright" style="display:none"><a href="http://www.iimei.com" target="_blank">© Meilala</a></div>
<img src="' . SYSDIR . 'public/img/welive.png" id="welive_avatar" style="padding:2px;display:none">
</header>
<div class="history" id="history">
示例6: parseInt
}else{
percent=Math.floor(percent);
}
document.getElementById("welive-righDiv").style.top = parseInt(document.getElementById("welive-righDiv").style.top)+percent+"px";
document.getElementById("welive-closeDiv").style.top = parseInt(document.getElementById("welive-closeDiv").style.top)+percent+"px";
welive_lastScrollY=welive_lastScrollY+percent;
}
window.setInterval("welive_move()",1);
var welive_panel_top = "<style type=\\"text\\/css\\">#welive-righDiv,#welive-closeDiv{padding:0px;position:absolute;}</style>" +
"<div id=\\"welive-closeDiv\\" style=\\"z-index:200018;width:60px;height:60px;top:108px;right:0px;display:" + (panel_status == 1? "none" : "block") + ";\\">" +
"<div style=\\"width:60px;height:60px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' . TURL . 'images/panel_open_bg.png\', sizingMethod=\'scale\');background:url(\'' . TURL . 'images/panel_open_bg.png\') !important;background:;\\"><div style=\\"position:absolute;right:12px;top:12px;\\"><a onClick=\\"welive_open_panel();return false;\\" style=\\"cursor:pointer;\\" title=\\"Open Panel\\"><img src=\\"' . TURL . 'images/panel_open.png\\" style=\\"border:0;\\" onMouseOver=\\"this.src=\'' . TURL . 'images/panel_open2.png\';\\" onMouseOut=\\"this.src=\'' . TURL . 'images/panel_open.png\';\\"></a></div></div></div>" +
"<div id=\\"welive-righDiv\\" style=\\"z-index:200008;width:168px;top:108px;right:0px;display:" + (panel_status == 1? "block" : "none") + ";\\">" +
"<div style=\\"height:30px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' . TURL . 'images/panel_top.png\', sizingMethod=\'scale\');background:url(\'' . TURL . 'images/panel_top.png\') !important;background:;\\"><div style=\\"position:absolute;left:12px;top:9px;\\"><img src=\\"' . TURL . 'images/' . Iif(IS_CHINESE, 'panel_title.png', 'panel_title_en.png') . '\\" style=\\"border:0;\\"></div><div style=\\"position:absolute;right:9px;top:9px;\\"><a onClick=\\"welive_close_panel();return false;\\" style=\\"cursor:pointer;\\" title=\\"Close\\"><img src=\\"' . TURL . 'images/panel_close.png\\" style=\\"border:0;\\" onMouseOver=\\"this.src=\'' . TURL . 'images/panel_close2.png\';\\" onMouseOut=\\"this.src=\'' . TURL . 'images/panel_close.png\';\\"></a></div></div>";
var welive_panel_main = "<div style=\\"width:144px;height:100%;padding:0 12px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' . TURL . 'images/panel_main.png\', sizingMethod=\'scale\');background:url(\'' . TURL . 'images/panel_main.png\') !important;background:;\\"><div style=\\"position:relative;width:142px;height:100%;background:#fff;border:1px solid #666;padding:0;margin:0;\\"><iframe id=\\"welive_main_frame\\" src=\\"' . BASEURL . 'online.php?url=' . $thisUrl . '\\" frameBorder=\\"0\\" style=\\"margin:0;padding:0;width:100%;height:' . $iframe_height . 'px;overflow:hidden;border:none;background:#FFF;\\" scrolling=\\"no\\"></iframe></div></div>";
var welive_panel_foot = "<div style=\\"height:12px;overflow:hidden;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' . TURL . 'images/panel_foot.png\', sizingMethod=\'scale\');background:url(\'' . TURL . 'images/panel_foot.png\') !important;background:;\\"></div></div>";
document.write(welive_panel_top);
document.write(welive_panel_main);
document.write(welive_panel_foot);';
}
?>
示例7: GotoPage
GotoPage('admin.messages.php' . Iif($uid, '?u=' . $uid), 1);
}
//########### PRINT DEFAULT ###########
if ($action == 'default') {
$NumPerPage = 20;
$page = ForceIncomingInt('p', 1);
$start = $NumPerPage * ($page - 1);
$fromid = ForceIncomingInt('u');
$toid = ForceIncomingInt('toid');
/*$searchsql = Iif($uid, "WHERE touserid ='$uid' ", "");
*/
//die ("SELECT userid, userfrontname FROM " . TABLE_PREFIX . "user WHERE usergroupid <>1 ORDER BY userid");
$getusers = $DB->query("SELECT userid, userfrontname FROM " . TABLE_PREFIX . "user WHERE usergroupid <>1 ORDER BY userid");
while ($user = $DB->fetch($getusers)) {
$users[$user['userid']] = $user['userfrontname'];
$useroptions .= '<option value="' . $user['userid'] . '" ' . Iif($uid == $user['userid'], 'SELECTED', '') . '>' . $user['userfrontname'] . '</option>';
}
$getguest = $DB->query("SELECT guestid,guestip FROM " . TABLE_PREFIX . "guest");
while ($guest = $DB->fetch($getguest)) {
$guests[$guest['guestid']] = $guest['guestip'];
}
if ($fromid) {
$searchsql = "where `fromid`='{$fromid}'";
}
if ($toid) {
$searchsql = "where `toid`='{$toid}'";
}
$getcomments = $DB->query("SELECT * FROM " . TABLE_PREFIX . "msg " . $searchsql . " ORDER BY created DESC LIMIT {$start},{$NumPerPage}");
$maxrows = $DB->getOne("SELECT COUNT(msgid) AS value FROM " . TABLE_PREFIX . "msg " . $searchsql);
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
示例8: index
public function index()
{
SubMenu('语言管理', array(array('语言列表及操作', 'language', 1)));
$Langs = GetLangs();
array_unshift($Langs, "Auto");
foreach ($Langs as $k => $val) {
$laname = Iif($val == 'Auto', '自动', Iif($val == 'Chinese', '中文', $val));
$langstr .= '<input type="radio" name="Lang" id="Lang_' . $k . '" value="' . $val . '"' . Iif(APP::$_CFG['Lang'] == $val, ' checked') . '><label for="Lang_' . $k . '">' . $laname . '</label><i class="w20"></i>';
}
TableHeader('访客默认语言');
TableRow('<form>
<b>设置访客窗口默认语言:</b><i class="w20"></i>' . $langstr . '
<input type="submit" value="保存设置" class="cancel" id="setlang"><BR>
<font class=grey>注: 当选择 <span class=note>自动</span> 时, 访客对话窗口将根据其浏览器语言自动选择语言, 非中文浏览器将显示英文信息提示.</font>
</form>');
TableFooter();
BR(2);
TableHeader('语言文件列表');
$files = GetLangs(1);
$columncount = 0;
echo '<td class="td last"><table width="100%" border="0" cellpadding="5" cellspacing="0">';
for ($i = 0; $i < count($files); $i++) {
$columncount++;
if ($columncount == 1) {
echo '<tr>';
}
echo '<td width="33%">';
$this->DisplayFileDetails($files[$i]);
echo '</td>';
if ($columncount == 3) {
echo '</tr>';
$columncount = 0;
}
}
@closedir($handle);
if ($columncount != 0 && $columncount != 3) {
while ($columncount < 3) {
$columncount++;
echo '<td> </td>';
}
echo '</tr>';
}
echo '</table></td>';
TableFooter();
echo '<script type="text/javascript">
$(function(){
$("#setlang").click(function(e){
var data = $(this).parent().serialize();
ajax("' . BURL('language/ajax?action=setlang') . '", data, function(data){
showInfo("访客窗口默认语言设置成功.", "Ajax操作", "", 1, 1);
});
e.preventDefault();
});
$("#main a.ajax").click(function(e){
var _me=$(this);
showDialog("确定删除语言文件: " + _me.attr("file") + " 吗?", "确认操作", function(){
ajax("' . BURL('language/ajax?action=delete') . '", {file: _me.attr("file")}, function(data){
_me.parent().parent().hide();
});
});
e.preventDefault();
});
});
</script>';
}
示例9: IsPost
function IsPost($VariableName)
{
return Iif(isset($_POST[$VariableName]), true, false);
}
示例10: while
<th>留言内容</th>
<th>留言给</th>
<th>时间</th>
<th><input type="checkbox" checkall="group" onclick="select_deselectAll (\'commentsform\', this, \'group\');"> 删除</th>
</tr>
</thead>
<tbody>';
if ($maxrows['value'] < 1) {
echo '<tr><td colspan="6"><center><span class=red>暂无任何留言!</span></center></td></tr></tbody></table></form>';
} else {
while ($comment = $DB->fetch($getcomments)) {
echo '<tr>
<td>' . $comment['username'] . '</td>
<td>' . Iif($comment['userip'], '<a href="javascript:;" hidefocus="true" onclick="iplocation(\'' . $comment['commentid'] . '\', \'' . $comment['userip'] . '\');return false;" title="查看IP归属地">' . $comment['userip'] . '</a><br><span id="ip_' . $comment['commentid'] . '"></span>', ' ') . '</td>
<td>' . nl2br($comment['content']) . '</a></td>
<td>' . Iif($users[$comment['touserid']], '<a href="admin.users.php?action=edituser&userid=' . $comment['touserid'] . '">' . $users[$comment['touserid']] . '</a>', '已删除') . '</td>
<td>' . DisplayDate($comment['created'], 0, 1) . '</td>
<td><input type="checkbox" name="deletecommentids[]" value="' . $comment['commentid'] . '" checkme="group"></td>
</tr>';
}
$totalpages = ceil($maxrows['value'] / $NumPerPage);
if ($totalpages > 1) {
echo '<tr><th colspan="6" class="last">' . GetPageList('admin.comments.php', $totalpages, $page, 10, 'u', $uid) . '</th></tr>';
}
echo '</tbody>
</table>
<div style="margin-top:20px;text-align:center;">
<input type="submit" onclick="return confirm(\'确定删除所选留言吗?\');" value=" 删除留言 " />
</div>
</form>';
}
示例11: str_replace
$disableupgrade = 'Disabled';
$new = str_replace('.', '', $WeLiveNewVersion);
$old = str_replace('.', '', APP_VERSION);
if (intval($new) <= intval($old)) {
$messages = '<font class=red>您现在正在使用的版本高于或等于升级程序中的版本, 无需升级!</font>';
} else {
$messages = '';
$disableupgrade = 'Enabled';
}
$availableupgrades++;
if ($upgradefinished) {
echo '<form method="post" action="admin.upgrade.php">
<input type="hidden" name="action" value="deleteupgradefiles">
<br><br><font class=blue>系统升级成功! 建议删除升级文件.</font><br><br><br>
<input type="submit" name="deletefiles" value="删除升级文件"><br><br>
</form>';
} else {
echo '<form method="post" action="admin.upgrade.php">
<input type="hidden" name="action" value="upgraderunning">
当前使用中的版本是: ' . APP_VERSION . '<br>
正要升级到的版本是: <font class=red>' . $WeLiveNewVersion . '</font><br>
<br><br>
' . Iif($messages, $messages . '<br><br><br>') . '
<input type="submit" name="upgrade" value="运行升级程序" ' . $disableupgrade . '><br><br>
</form>';
}
} else {
echo '<br><br><b>暂无可用的升级程序!</b><br><br><br>';
}
echo '</td></tr></table>';
PrintFooter();
示例12: Iif
echo '<tr>
<td>
<input type="hidden" name="userids[]" value="' . $user['userid'] . '">
<input type="text" name="displayorders[]" value="' . $user['displayorder'] . '" size="4"></td>
</td>
<td><a href="admin.users.php?action=' . Iif($user['type'] > 1, 'editqms', 'edituser') . '&userid=' . $user['userid'] . '" ' . Iif(!$user['activated'], 'class="red"') . '>' . $user['username'] . '</a>' . Iif($typename, ' (' . $typename . ')') . '</td>
<td>
<select name="activateds[]">
<option value="1">正常</option>
<option style="color:red;" value="0" ' . Iif(!$user['activated'], 'SELECTED', '') . '>禁止</option>
</select></td>
<td>' . $usergroups[$user['usergroupid']] . '</td>
<td>' . Iif($user['userfrontname'], $user['userfrontname'], '-') . '</td>
<td>' . Iif($user['userfrontename'], $user['userfrontename'], '-') . '</td>
<td>' . Iif($typename, '-', Iif($user['isonline'], '<span class="green">在线</span>', '离线')) . '</td>
<td>' . Iif($typename, '-', Iif($user['lastlogin'], DisplayDate($user['lastlogin'], '', 1), '从未登录')) . '</td>
<td><input type="checkbox" name="deleteuserids[]" value="' . $user['userid'] . '" ' . Iif($user['userid'] == 1 or $user['userid'] == $userinfo['userid'], 'disabled') . '></td>
</tr>';
}
echo '</tbody>
</table>
<div style="margin-top:20px;text-align:center;">
<input type="submit" name="updateusers" value=" 保存更新 " />
<input type="submit" name="deleteusers" onclick="return confirm(\'确定删除所选用户吗?\');" value=" 删除用户 " />
</div>
</form>';
}
PrintFooter();
?>
示例13: while
<th>状态</th>
<th>短语内容</th>
<th>编辑</th>
<th><input type="checkbox" checkall="group" onclick="select_deselectAll (\'messagesform\', this, \'group\');"> 删除</th>
</tr>
</thead>
<tbody>';
if ($maxrows['value'] < 1) {
echo '<tr><td colspan="5"><center><span class=red>暂无任何短语!</span></center></td></tr></tbody></table></form>';
} else {
while ($message = $DB->fetch($getmessages)) {
echo '<tr>
<td><input type="hidden" name="msgids[]" value="' . $message['msgid'] . '" /><input type="text" name="ordernums[]" value="' . $message['ordernum'] . '" size="4" /></td>
<td><select name="activateds[]"><option value="1">显示</option><option style="color:red;" value="0" ' . Iif(!$message['activated'], 'SELECTED', '') . '>隐藏</option></select></td>
<td><textarea name="msgs[]" style="height:32px;width:360px;">' . $message['msg'] . '</textarea></td>
<td><a href="admin.automsg.php?action=editmsg&msgid=' . $message['msgid'] . '">' . Iif($message['activated'], '编辑', '<span class=red>编辑</span>') . '</a></td>
<td><input type="checkbox" name="deletemsgids[]" value="' . $message['msgid'] . '" checkme="group"></td>
</tr>';
}
$totalpages = ceil($maxrows['value'] / $NumPerPage);
if ($totalpages > 1) {
echo '<tr><th colspan="5" class="last">' . GetPageList('admin.automsg.php', $totalpages, $page, 10, 's', urlencode($search)) . '</th></tr>';
}
echo '</tbody>
</table>
<div style="margin-top:20px;text-align:center;">
<input type="submit" name="updatemsgs" value=" 保存更新 " />
<input type="submit" name="deletemsgs" onclick="return confirm(\'确定删除所选短语吗?\');" value=" 删除短语 " />
</div>
</form>';
}
示例14: preg_replace
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>' . SITE_TITLE . '</title>
<script type="text/javascript" src="includes/javascript/Ajax.js"></script>
<script type="text/javascript" src="includes/javascript/Support.js"></script>
<script type="text/javascript" src="includes/javascript/x-win.js"></script>
<link rel="stylesheet" type="text/css" href="templates/support.css">
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<a href="#" name="top"></a>
<div id="msgs_div" class="msgs_div" style="display:none">' . $automsgs . '</div>
<div id="maindiv">
<div id="header">
<div class="logo"><img src="' . TURL . 'images/logo.gif" align="absmiddle"> ' . SITE_TITLE . '</div>
<div id="userinfo">' . preg_replace('/\\/\\/1/i', '<span class=spec>' . $userinfo['userfrontname'] . '</span>', $lang['welcome_user']) . ' ' . Iif($userinfo['comments'], '<a href="admin.mycomments.php" target="_blank">您有' . $userinfo['comments'] . '条留言</a>', '暂无给您的留言') . '. [ <a href="index.php?logout=1" onclick="return confirm(\'' . $lang['logoutinfo'] . '\');"><span style="color:#FF3300;font-weight:700;">' . $lang['logout'] . '</span></a> ] [ <span id="setbusy"><a href="javascript:;" onclick="setbusy();return false;"><b>挂起</b></a> </span>]</div>
<div class="timer_div"><span id="timer">00:00</span></div>
</div>
<div class="contentdiv">
<div class="welive_div">
<table id="welive_list" border="0" cellpadding="0" cellspacing="0" class="waiting">
<thead>
<tr>
<th class="first">访客</th>
<th>上线时间</th>
<th>IP地址</th>
<th>浏览器</th>
<th>来自页面</th>
<th>操作</th>
</tr>
</thead>
示例15: define
define('COPYRIGHT', '© ' . date("Y") . ' <a href="' . APP_URL . '" target="_blank">' . APP_NAME . '</a> ' . base64_decode('5Zyo57q/5a6i5pyN57O757uf ') . '(v' . APP_VERSION . ')');
if (defined('AUTH')) {
//客服和管理员只显示中文, 且需要授权
include BASEPATH . 'includes/welive.Support.php';
define('IS_CHINESE', 1);
define('SITE_TITLE', $_CFG['cTitle']);
@(include BASEPATH . 'languages/Chinese.php');
if (!defined('AJAX')) {
//客服的AJAX操作无需授权
include BASEPATH . 'includes/welive.Auth.php';
}
} elseif ($_CFG['cActived']) {
//客人自动选择语言
include BASEPATH . 'includes/welive.Functions.php';
$sitelang = ForceIncomingCookie('LANG' . COOKIE_KEY);
if (!$sitelang) {
if ($_CFG['cLang'] == 'Auto') {
if (strstr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), 'zh-cn') or strstr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), 'zh-tw')) {
$sitelang = 'Chinese';
} else {
$sitelang = 'English';
}
} else {
$sitelang = $_CFG['cLang'];
}
}
define('SITE_LANG', $sitelang);
define('IS_CHINESE', Iif(SITE_LANG == 'Chinese', 1, 0));
define('SITE_TITLE', Iif(IS_CHINESE, $_CFG['cTitle'], $_CFG['cTitle_en']));
@(include BASEPATH . 'languages/' . SITE_LANG . '.php');
}