当前位置: 首页>>代码示例>>PHP>>正文


PHP check::getAPIArray方法代码示例

本文整理汇总了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'] = '执行';
     }
 }
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:modifyinfo.php

示例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;
         }
     }
 }
开发者ID:TiMoChao,项目名称:xingfu,代码行数:53,代码来源:user.class.php

示例3: print_r

            }
            echo "<a href='{$val}' target=_blank>{$val}</a> &nbsp;&nbsp;&nbsp;&nbsp;<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("&nbsp;"," ",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);
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:fecth.php

示例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;
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:addinfo.php

示例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';
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:regin.php

示例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);
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:index.inc.php

示例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);
开发者ID:TiMoChao,项目名称:xingfu,代码行数:31,代码来源:index.php

示例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;
}
开发者ID:TiMoChao,项目名称:xingfu,代码行数:33,代码来源:common.fun.php


注:本文中的check::getAPIArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。