本文整理匯總了PHP中check::getAPIArray方法的典型用法代碼示例。如果您正苦於以下問題:PHP check::getAPIArray方法的具體用法?PHP check::getAPIArray怎麽用?PHP check::getAPIArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類check
的用法示例。
在下文中一共展示了check::getAPIArray方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unlink
if (is_file($strOldSFile)) {
unlink($strOldSFile);
}
if (is_file($strOldBFile)) {
unlink($strOldBFile);
}
if (is_file($strOldMFile)) {
unlink($strOldMFile);
}
//unset($arrUserinfo['thumbnail']);
$arrTemp['thumbnail'] = '';
$arrTemp['user_id'] = $arrUserinfo['user_id'];
$objWebInit->updateUser($arrTemp);
//同步user表
$arrTemp['recommendflag'] = 0;
$strTemp = check::getAPIArray($arrTemp);
check::getAPI('user', 'updateUser', $strTemp);
check::WindowLocation("?action=edit&id=" . $userid . "");
} else {
check::AlertExit('刪除失敗!', -1);
}
}
$arrTemp = array();
foreach ($arrGMeta as $k => $v) {
if ($k != 'index') {
$arrTemp[$k]['r'] = $v['name'];
$arrTemp[$k]['w'] = '寫';
$arrTemp[$k]['d'] = '刪';
$arrTemp[$k]['x'] = '執行';
}
}
示例2: saveInfo
/**
* 保存會員信息
* @author 肖飛
* @param int $arrData 數組
* @param int $intModify 是否修改
* @param bool $isAlert 數組
* @param bool $isLastID 數組
* @return void
*/
function saveInfo($arrData, $isModify = false, $isAlert = true, $isMcenter = false)
{
if ($isMcenter) {
$strData = check::getAPIArray($arrData);
if (!($intUserID = check::getAPI('mcenter', 'saveInfo', "{$strData}^{$isModify}^false"))) {
if ($isAlert) {
check::AlertExit("與用戶中心通訊失敗,請稍後再試!", -1);
}
return 0;
}
}
$arr = array();
$arr = check::SqlInjection($this->saveTableFieldG($arrData, $isModify));
if ($isModify == 0) {
if (!empty($intUserID)) {
$arr['user_id'] = $intUserID;
}
if ($this->insertUser($arr)) {
if (!empty($intUserID)) {
return $intUserID;
} else {
return $this->lastInsertIdG();
}
} else {
if ($blAlert) {
check::Alert("新增失敗");
}
return false;
}
} else {
if ($this->updateUser($arr) !== false) {
if ($isAlert) {
check::Alert("修改成功!");
} else {
return true;
}
} else {
if ($blAlert) {
check::Alert("修改失敗");
}
return false;
}
}
}
示例3: print_r
}
echo "<a href='{$val}' target=_blank>{$val}</a> <a href='javascript:history.go(-1);'>返回</a><pre>";
print_r($arrSave);
echo "</pre>";
$arrSave['type_id'] = $arrGFetch[$_GET['id']]['type_id'];
//if(!empty($arrSave['intro'])) $arrSave['summary'] = check::csubstr(trim(str_replace(" "," ",str_replace("\r\n","",strip_tags($arrSave['intro'])))),0,250);
if (!empty($arrSave['intro'])) {
$arrSave['summary'] = check::csubstr(check::stripText($arrSave['intro']), 0, 250);
}
if (!empty($arrGFetch[$_GET['id']]['delimiter_df'])) {
foreach ($arrGFetch[$_GET['id']]['delimiter_df'] as $k => $v) {
if (!empty($v[0])) {
$arrSave[$v[0]] = $v[1];
}
}
}
$strData = check::getAPIArray($arrSave);
check::getAPI($arrGFetch[$_GET['id']]['module_id'], 'saveInfo', "{$strData}^0^0");
echo ' <font color="green">采集成功!</font><br />';
if ($_GET['action'] == 'fetch') {
exit;
}
}
}
}
// 輸出到模板
$arrMOutput["smarty_assign"]['strNav'] = '數據采集器';
$arrMOutput["smarty_assign"]['arrInfo'] = $arrData;
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['admin_main_dir'] . 'tools/fetch/index.htm';
$objWebInit->output($arrMOutput);
示例4: date
check::AlertExit("錯誤:用戶名已被注冊!", -1);
}
//生日轉換
$_POST['birthday'] = date('Y-m-d', strtotime($_POST['year'] . '-' . $_POST['month'] . '-' . $_POST['day']));
unset($_POST['year']);
unset($_POST['month']);
unset($_POST['day']);
//會員密碼處理
if (!empty($arrGWeb['user_pass_type'])) {
$_POST['password'] = check::strEncryption($_POST['password'], $arrGWeb['jamstr']);
}
$intID = $objWebInit->saveInfo($_POST, 0, false, true);
if ($intID) {
$arrData['user_id'] = $intID;
$arrData['add_date'] = date('Y-m-d H:i:s');
$strData = check::getAPIArray($arrData);
check::getAPI('mcenter', 'updateUser', $strData);
} else {
check::AlertExit('注冊失敗', -1);
}
check::WindowLocation($arrGWeb['WEB_ROOT_pre'] . '/mcenter/admin/index.php');
}
$arrTemp = array();
foreach ($arrGMeta as $k => $v) {
if ($k != 'index') {
$arrTemp[$k] = $v['name'];
}
}
// 輸出到模板
$arrMOutput["template_file"] = "admin.html";
$arrMOutput["smarty_assign"]['arrGMeta'] = $arrTemp;
示例5: date
$arrData['answer'] = $_POST['answer'];
$arrData['sex'] = $_POST['sex'];
$arrData['tel'] = $_POST['tel'];
$arrData['province'] = $_POST['province'];
$arrData['city'] = $_POST['city'];
$arrData['area'] = $_POST['area'];
$arrData['user_ip'] = check::getIP();
$arrData['submit_date'] = date('Y-m-d H:i:s');
$arrData['session_id'] = session_id();
$intID = $objWebInit->saveInfo($arrData, 0, false, true);
if ($intID) {
$_SESSION['user_id'] = $intID;
$_SESSION = array_merge($_SESSION, $arrData);
$arrTemp['user_id'] = $intID;
$arrTemp['add_date'] = date('Y-m-d H:i:s');
$strData = check::getAPIArray($arrTemp);
check::getAPI('mcenter', 'updateUser', $strData);
echo "<script>alert('注冊完成');window.location='{$arrGWeb['WEB_ROOT_pre']}/';</script>";
exit;
} else {
check::AlertExit('注冊失敗', -1);
}
}
$strTitle = $arrGWeb['name'] . '-注冊';
$strDescription = $strTitle;
$strKeywords = $strTitle;
// 輸出到模板
$arrMOutput['smarty_assign']['Title'] = $strTitle . ' - ' . $arrGWeb['name'];
$arrMOutput['smarty_assign']['Description'] = $strDescription . ' - ' . $arrGWeb['name'];
$arrMOutput['smarty_assign']['Keywords'] = $strKeywords . ' - ' . $arrGWeb['name'];
$arrMOutput["smarty_assign"]['arrGWeb']['css'][] = 'reg.css';
示例6: foreach
foreach ($arrModuleDirs as $k => $v) {
if (!empty($v['cache']) && $v['cache'] == 1) {
$arrInfoList[$k] = array('name' => $v['name']);
if (is_file('../data/' . $k . '/' . $k . '_type.php')) {
@(include '../data/' . $k . '/' . $k . '_type.php');
}
if (!empty($arrMType)) {
foreach ($arrMType as $key => $val) {
if (empty($val['type_link'])) {
$arrInfoList[$k]['type'][] = array('type_id' => $val['type_id'], 'name' => $val['type_title']);
}
}
} else {
$objWebInit->tablename1 = $arrGPdoDB['db_tablepre'] . $k . '_type';
$arrType = check::getAPI($k, "getTypeList", "");
$strType = check::getAPIArray($arrType);
$arrMType = check::getAPI($k, "formatTypeList", "0^{$strType}^0");
if (!empty($arrMType)) {
foreach ($arrMType as $key => $val) {
if (empty($val['type_link'])) {
$arrInfoList[$k]['type'][] = array('type_id' => $val['type_id'], 'name' => $val['type_title']);
}
}
}
}
}
}
// 輸出到模板
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);
示例7: array
if (stripos($_POST['real_name'], $v) !== false) {
check::AlertExit("輸入的昵稱包含非法字符!", -1);
}
}
if (!is_numeric($_POST['mobile']) or strlen($_POST['mobile']) > 12) {
check::AlertExit("電話必須為數字並且不能大於12!", -1);
}
if (!check::CheckPost($_POST['postcode'])) {
check::AlertExit("郵編不符合要求", -1);
}
$arrUserTableData = array();
$arrUserTableData['user_id'] = $_SESSION['user_id'];
$arrUserTableData['nick_name'] = strip_tags($_POST['real_name']);
//昵稱用真實姓名代替
$strDataInfo = check::getAPIArray($arrUserTableData);
check::getAPI('user', 'updateUser', $strDataInfo);
$_POST['user_id'] = $_SESSION['user_id'];
foreach ($_POST as $key => $value) {
$_SESSION[$key] = $value;
}
$_SESSION['nick_name'] = $_POST['real_name'];
$_POST['nick_name'] = $_POST['real_name'];
$strData = check::getAPIArray($_POST);
check::getAPI('mcenter', 'updateUser', $strData);
check::AlertExit('修改成功!', -1);
}
//輸出到模板
$arrMOutput["smarty_assign"]['arrData'] = $arrInfo;
$arrMOutput["smarty_assign"]['arrGWeb']['css'][] = 'reg.css';
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);
示例8: count_referer
function count_referer($isSave = 1, $uid = null)
{
global $arrGWeb;
$objShared = System_SharedMemory::factory();
if (empty($strVarName)) {
$strVarName = $arrGWeb['install_date'] . 'referer';
}
$arrPayLog = json_decode($objShared->get($strVarName), TRUE);
if ($isSave == 1) {
$arrPayLog[$uid] = 1;
} elseif ($isSave == 0) {
if (!empty($arrPayLog) && array_key_exists($_SESSION['user_id'], $arrPayLog)) {
$host = empty($_COOKIE['referer_host']) ? "5217u.com" : $_COOKIE['referer_host'];
$time = date("Y-m-d");
$referer = check::getAPI("referer", "getInfoWhere", "where host='{$host}' and time='{$time}'^*");
if (empty($referer)) {
$arr_referer = array();
$arr_referer['time'] = $time;
$arr_referer['host'] = $host;
$arr_referer['buy_times'] = 1;
$str_referer = check::getAPIArray($arr_referer);
check::getAPI("referer", "saveInfo", "{$str_referer}^0^0");
} else {
$referer['buy_times'] += 1;
$str_referer = check::getAPIArray($referer);
check::getAPI("referer", "saveInfo", "{$str_referer}^1^0");
}
unset($arrPayLog[$_SESSION['user_id']]);
}
}
$objShared->set($strVarName, json_encode($arrPayLog));
return true;
}