本文整理匯總了PHP中System::check_func方法的典型用法代碼示例。如果您正苦於以下問題:PHP System::check_func方法的具體用法?PHP System::check_func怎麽用?PHP System::check_func使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System
的用法示例。
在下文中一共展示了System::check_func方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
break;
}
//緩存係統用戶組
Cached::table('system', 'sys:group', array('jsonde' => array('config'), 'serialize' => array('module', 'widget')));
}
//search
$s = getgpc("s");
$q = getgpc('q');
?>
<div id="search">
<form name="form1" method="get" action="?">
<span class="action">
<?php
if (System::check_func('system-group-add')) {
?>
<button type="button" class="button" onclick="location.href='group.edit.php';">添加分組</button>
<?php
}
?>
<button type="button" class="button" onclick="if(confirm('確定現在要更新緩存嗎?')){location.href='?action=create';}">更新緩存</button>
</span>
<select name="s" id="s" size="1">
<option value="name">組名稱</option>
<option value="account">用戶名</option>
<option value="id">ID</option>
</select>
<input name="q" type="text" class="text" title="請輸入關鍵字" id="q" value="<?php
echo $q;
示例2: html_start
<?php
/*
* Copyright VeryIDE 2009-2012
* http://www.veryide.com/
*/
require '../../source/dialog/loader.php';
html_start("係統設置 - VeryIDE");
?>
<?php
require_once VI_ROOT . 'source/class/setting.php';
//檢查權限
$func = 'system-system-set';
System::check_func($func, FALSE);
$do = getgpc('do');
if (!$do) {
ob_end_clean();
header("location:?do=global");
exit;
}
$active = array('global', 'attach', 'mail');
if (in_array($do, $active)) {
$_GalSet = new Setting(VI_ROOT . 'config/' . $do . '.php', VI_ROOT . 'config/' . $do . '.xml', $do);
if ($_GET["action"] == "update" && !empty($_POST)) {
//var_dump($_POST);
//exit;
if ($_GalSet->save('POST')) {
//連接數據庫
System::connect();
//寫入日誌
示例3:
<button type="submit" class="submit">開始掃描</button>
</p>
</td>
</tr>
</table>
</form>
<?php
}
?>
<?php
if (System::check_func('system-cache')) {
?>
<div class="item">係統清理工具</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
<tr class="thead">
<td width="120">工具</td>
<td>目錄</td>
<td>大小</td>
<td>作用</td>
<td width="70"></td>
</tr>
<tr class="line">
<td>清除查詢緩存</td>
示例4: rawurlencode
} else {
echo '<td>無</td>';
}
echo "</tr>";
}
if ($x == 1) {
echo '<tr> <td colspan="6" class="notice">更新清單暫時沒有記錄</td> </tr>';
} else {
echo '<tr> <td colspan="6" class="choice">請按版本順序安裝更新</td> </tr>';
}
?>
</table>
<?php
if (System::check_func('system-update-sql')) {
?>
<div class="item">執行 SQL 查詢</div>
<form action="?jump=<?php
echo rawurlencode($jump);
?>
" method="post" name="edit-form" data-mode="edit" data-valid="true">
<p>
<textarea name="sql" style="width:700px;" rows="6" id="sql"></textarea>
</p>
<p class="highlight">
注意: 為確保升級成功,請不要修改官方發布的 SQL 語句任何部分。
示例5: Mo
<tr>
<td></td>
<td>
<input name="action" type="hidden" id="action" value="create" />
<button type="submit" name="Submit" class="submit">創建此備份</button>
</td>
</tr>
</table>
</form>
<?php
} else {
echo System::check_func('system-backup-add', true);
}
?>
<script type="text/javascript">
//綁定表單事件
Mo("button[type=button]").bind( 'click', function( index, e ){
if( Mo( this ).attr('data-target') == '_blank' ){
window.open( Mo( this ).attr('data-href') );
}else{
if( confirm('此操作不可撤消,確定要這麽做嗎?') ){
示例6: foreach
';
}
?>
<tr>
<th>電子郵箱:</th>
<td><input name="email" type="text" class="text" value="<?php
echo $row["email"];
?>
" size="35" data-valid-name="電子郵箱" data-valid-empty="yes" />
用來接收郵件通知
</td>
</tr>
<?php
if (System::check_func('system-account-gid')) {
?>
<tr>
<th>用戶分組:</th>
<td>
<?php
foreach ($_CACHE['system']['group'] as $key => $value) {
echo '<label><input type="radio" class="radio" name="gid" value="' . $key . '" ' . ($key == $row["gid"] ? 'checked="checked"' : '') . ' data-valid-name="用戶級別" data-valid-empty="yes" /><img src="' . VI_BASE . 'static/image/medal/mini_' . $value["medal"] . '" />' . $value["name"] . '</label>';
}
?>
</td>
</tr>
<?php
}
?>
示例7: switch
switch ($execute) {
//本地環境檢測
case "status":
if (System::check_func('system-system-set') === FALSE) {
exit;
}
$status = System::check_status();
$upgrade = System::check_upgrade();
$install = System::check_install();
$filehash = System::check_filehash();
echo $callback . '( { "status" : ' . $status['stat'] . ', "upgrade" : ' . $upgrade['stat'] . ', "install" : ' . $install['stat'] . ', "filehash" : ' . $filehash['stat'] . ' } );';
break;
//雲平台通知
//雲平台通知
case "notified":
if (System::check_func('system-module-set') === FALSE) {
exit;
}
require_once VI_ROOT . 'source/class/cloud.php';
$module = array();
foreach ($_CACHE['system']['module'] as $appid => $app) {
$module[$appid] = array('signed' => $app['signed'], 'version' => $app['version']);
}
$command = array('execute' => $execute, 'charset' => $_G['product']['charset'], 'engine' => $_G['product']['version'], 'module' => $module, 'serial' => $_G['licence']['module']);
$content = Cloud::request($command);
echo $callback . '(' . json_encode($content) . ');';
break;
}
}
break;
}
示例8: foreach
<div id="search">
<!--用於日誌操作-->
<form name="post-form" id="post-form" method="post" action="?">
<input name="list" id="list" type="hidden" value="">
<input name="action" id="action" type="hidden" value="" />
<input name="url" id="url" type="hidden" value="" />
</form>
<!--用於日誌操作-->
<form name="find-form" id="find-form" method="get" action="?">
<span class="action">
<?php
if (System::check_func('system-event')) {
?>
<button class="button" type="button" onclick="Mo('#account').value(<?php
echo $_G['manager']['id'];
?>
);Mo('#find-form').item(0).submit();">我的日誌</button>
<select name="account" id="account" onchange="Mo('#find-form').item(0).submit();" ignore="true">
<optgroup label="選擇用戶" />
<option value="">所有用戶</option>
<?php
foreach ($_CACHE['system']['admin'] as $aid => $row) {
echo '<option value="' . $aid . '">' . $row['account'] . '</option>';
}
?>
</select>
<script> Mo("#account").value("<?php
示例9: delete
public static function delete($file, $param = array())
{
global $_G;
//檢查權限
if (System::check_func('system-upload-del') == false) {
return FALSE;
}
//查詢數據庫
$sql = "SELECT id, type, remote from `sys:attach` WHERE ( name='{$file}' ) LIMIT 0, 1";
$row = System::$db->getOne($sql);
if ($row) {
$res = $row['remote'] ? self::delete_remote($file, $param) : self::delete_locale($file, $param);
//刪除數據
System::$db->execute("DELETE FROM `sys:attach` WHERE id=" . $row['id']);
return $res;
} else {
return FALSE;
}
}
示例10: foreach
?>
<p><strong>文件讀寫權限缺失</strong></p>
<ul>
<?php
foreach ($notice['directory'] as $item) {
echo '<li>' . $item . '</li>';
}
?>
</ul>
<p>請創建或更改以上文件權限,<a href="http://www.veryide.com/guide.php?appid=system&id=3" target="_blank">參考手冊 »</a></p>
<?php
}
?>
<p> <button type="button" onclick="location.reload();">再試試</button> </p>
</dd>
</dl>
<!--調試界麵_開始-->
</div>
<?php
exit;
} else {
//加載擴展模板
if ($_G['manager']['id'] && System::check_func('system-module-set') && GetIP() != '127.0.0.1') {
require VI_ROOT . 'source/dialog/extend.php';
}
}
示例11: getnum
$parent = $parent ? getnum("category", 0) : $parent;
$sql = "INSERT INTO `mod:common_category`(appid,name,parent,sort,state,dateline) VALUES('system-district','" . $name . "'," . $parent . "," . $sort . ",1," . time() . ")";
System::$db->execute($sql);
$_G['project']['message'] = "新增區域成功!";
break;
}
//更新分類數組緩存
Cached::multi('system', "SELECT id,name,parent,state FROM `mod:common_category` WHERE appid = 'system-district' ORDER BY sort ASC", 'table.district', array('alias' => 'district'));
//更新分類腳本緩存
Cached::script('system', "SELECT id,name,parent FROM `mod:common_category` WHERE appid = 'system-district' ORDER BY sort ASC", "DISTRICT", "mod.district", array('unicode' => array('name')));
}
Cached::loader('system', 'table.district');
?>
<?php
echo System::check_func('system-system-set', true);
?>
<div id="search">
<form name="find-form" id="find-form" method="post" data-mode="edit" data-valid="true">
<span class="action">
<input type="button" value="更新緩存" onclick="if(confirm('確定現在更新分類緩存嗎?')){location.href='?action=create';}" class='button'>
</span>
區域:<input name="name" type="text" class="text" value="" size="20" data-valid-name="分類名稱" data-valid-empty="yes" />
排序:<input name="sort" type="text" class="text digi" value="" data-valid-name="分類排序" data-valid-number="no" />
<var data-type="tip">從小到大依次排序</var>
<label>
<input type="radio" class="radio" name="parent" id="parent" value="0" onclick="Mo('#category').disabled();" checked>
大分類