本文整理汇总了PHP中Sys::S方法的典型用法代码示例。如果您正苦于以下问题:PHP Sys::S方法的具体用法?PHP Sys::S怎么用?PHP Sys::S使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sys
的用法示例。
在下文中一共展示了Sys::S方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verify
static function verify()
{
$data = array('uname' => array(null, 'string', '', '用户名为空'), 'password' => array(null, 'length', array(4, 16), '密码错误'), 'checkcode' => array(null, 'string', '', '验证码为空'));
Sys::S('core.Verify.Input');
$data = Input::dataFilter($data, 'post');
if (!isset($_SESSION['verify_code']) || strtoupper($data['checkcode']) != $_SESSION['verify_code']) {
Error::halt(self::WRONG_CHECK_CODE, '验证码错误!');
}
$oUcenterMember = Sys::D('UcenterMember');
$loginStatus = UcenterMemberModel::login($data['uname'], $data['password']);
if ($loginStatus >= 10) {
if ($loginStatus == 10) {
Error::halt(UcenterMemberModel::LOGIN_SUCCESS, array('msg' => '登录成功', 'redirect' => DOMAIN . 'Index_index.jsp'));
} else {
if ($loginStatus == UcenterMemberModel::ACCOUNT_LOCKED) {
Error::halt($loginStatus, '账号已被锁定!');
} else {
if ($loginStatus == UcenterMemberModel::ACCOUNT_DISABLED) {
Error::halt($loginStatus, '账号无效');
} else {
Error::halt($loginStatus, '用户名或密码错误');
}
}
}
} else {
$msg = $loginStatus <= 0 ? '您的账号已被锁定' : '登录失败,您还有' . $loginStatus . '次机会登录!';
Error::halt($loginStatus, $msg);
}
}
示例2: index
static function index()
{
Sys::D('StoreVisitStatic');
// StoreVisitStaticModel::newAccessNum(1);
// $accessNum=StoreVisitStaticModel::getVisitedNum(1);
// Sys::D('StoreOrderStatic');
// $num= StoreOrderStaticModel::getDateOrderNum(1,'20150819');
//
// var_dump($num);
// Sys::D('SysMessage');
// $msgData=SysMessageModel::getMsgList();
// Sys::D('UserAddress');
//
// UserAddressModel::newAddress(1,'bee','18224087281','成都市高新区天府软件园D区6栋一楼232');
// UserAddressModel::disabledAddress(1);
//
// $data= UserAddressModel::getList(1);
//
// var_dump($data);
// Sys::D('AreaLnglat');
// $data= AreaLnglatModel::getLngLatByCode('340403');
// $data=AreaLnglatModel::getInfoByCode('510100');
// $address=AreaLnglatModel::decorateAddress('510100','510100','详细地址');
// var_dump($address);
Sys::S('core.PhpExcel.PHPExcel.php');
PHPExcel::init();
$PHPExcel = PHPExcel::load();
}
示例3: add
static function add($user_id, $store_id, $goodsData = array(), $receiveData = array(), $remark = '')
{
Sys::D('OrderDateStatic');
Sys::S('core.SerialNumber.SerialNumber');
$date = date('Ymd', NOW);
OrderDateStaticModel::sync($date);
$curDayMaxId = OrderDateStaticModel::getOrderId($date);
$orderNum = SerialNumber::orderNum(self::BUSINESS_NORMAL, $curDayMaxId);
$totalPrice = self::saveGoodsInfo($goodsData, $orderNum);
/*订单基本信息*/
Sys::D('OrderBaseinfo');
OrderBaseinfoModel::addOrder($user_id, $store_id, $orderNum, $totalPrice);
/*同步店铺订单统计信息*/
Sys::D('StoreOrderStatic');
StoreOrderStaticModel::sync($store_id, $orderNum, $date);
/*同步派送信息*/
Sys::D('OrderDelivery');
isset($receiveData['zipCode']) || ($receiveData['zipCode'] = '');
OrderDeliveryModel::sync($orderNum, $receiveData['username'], $receiveData['tel'], $receiveData['address'], $receiveData['zipCode']);
/*备注*/
if ($remark) {
Sys::D('OrderRemark');
OrderRemarkModel::sync($orderNum, $remark);
}
}
示例4: index
static function index()
{
$treeData = array(array('id' => 1, 'pid' => 0, 'name' => 'bee1', 'age' => '12', 'href' => 'javascript:;', 'html' => 'test1', 'icon' => 'fa fa-home'), array('id' => 2, 'pid' => 1, 'name' => 'bee2', 'age' => '13', 'href' => 'javascript:;', 'html' => 'test2', 'icon' => 'fa fa-home'), array('id' => 3, 'pid' => 2, 'name' => 'bee3', 'age' => '14', 'href' => 'javascript:;', 'html' => 'test3', 'icon' => 'fa fa-home'), array('id' => 4, 'pid' => 1, 'name' => 'bee4', 'age' => '15', 'href' => 'javascript:;', 'html' => 'test4', 'icon' => 'fa fa-home'), array('id' => 8, 'pid' => 2, 'name' => 'bee8', 'age' => '16', 'href' => 'javascript:;', 'html' => 'test5', 'icon' => 'fa fa-home'), array('id' => 6, 'pid' => 4, 'name' => 'bee6', 'age' => '17', 'href' => 'javascript:;', 'html' => 'test6', 'icon' => 'fa fa-home'), array('id' => 7, 'pid' => 1, 'name' => 'bee7', 'age' => '18', 'href' => 'javascript:;', 'html' => 'test7', 'icon' => 'fa fa-home'));
Sys::S('core.Html5.Menu.LeftMenu');
$data = LeftMenu::getMenu($treeData, 'id', 'pid', 'href', 'html', 'icon');
View::assign('userinfo', $_SESSION['userinfo']);
View::assign('leftMenu', $data);
View::display();
}
示例5: log
public static function log($username, $psd, $ip = '')
{
if (empty($ip)) {
Sys::S('core.Server.Ip');
$ip = Ip::get_client_ip();
}
$data = array('username' => addslashes($username), 'psd' => addslashes($psd), 'ip' => bindec(decbin(ip2long($ip))), 'record_time' => NOW);
return Sys::M(self::$trueTableName)->insert($data);
}
示例6: loginSuccess
private static function loginSuccess($userId, $ip = '')
{
if (empty($ip)) {
Sys::S('core.Server.Ip');
$ip = Ip::get_client_ip();
}
$intIp = Ip::getInt($ip);
$data = array('last_login_ip' => array($intIp, 'int'), 'last_login_time' => array(NOW, 'int'), 'login_err_times' => array(0, 'int'));
return Sys::M(self::$trueTableName)->update($data, '`id`=' . $userId);
}
示例7: getMenu
static function getMenu($data, $k_id, $k_pid, $k_href, $k_html, $k_icon = 'k_icon')
{
Sys::S('Tree.Tree');
$data = Tree::getTreeData($data, $k_id, $k_pid);
self::$k_id = $k_id;
self::$k_pid = $k_pid;
self::$k_href = $k_href;
self::$k_html = $k_html;
self::$k_icon = $k_icon;
return self::decorateData($data);
}
示例8: modifyPassword
public function modifyPassword()
{
Sys::S('core.Verify.Input');
$data = array('src_password' => array(null, 'string', '', '原密码不能为空'), 'new_password' => array(null, 'string', '', '新密码不能为空'));
$data = Input::dataFilter($data, 'post');
if (md5($data['src_password']) != $_SESSION['userinfo']['password']) {
Error::halt(FAIL, '原密码不正确');
} else {
if ($data['src_password'] == $data['new_password']) {
Error::halt(FAIL, '新密码不能与原密码一致');
} else {
Sys::D('UcenterMember');
UcenterMemberModel::savePassword($_SESSION['userinfo']['id'], $data['new_password']);
Error::halt(SUCCESS, '操作成功');
}
}
}
示例9: jsonReturn
private static function jsonReturn($msgCode, $msg, $url = '')
{
Sys::S('core.Return.JsonReturn');
JsonReturn::output($msgCode, $msg, $url);
}
示例10: parseUrl
public static function parseUrl($url = '')
{
empty($url) && ($uri = $_SERVER['REQUEST_URI']);
Sys::S('core.Url.Uri');
Uri::setParam(array('m', 'a'), array('pg', 'order'));
self::$urlTpl = Uri::toPageUriTpl($_SERVER['REQUEST_URI']);
}
示例11: errorHandle
static function errorHandle($data)
{
if (defined('AJAX_REQUEST') && AJAX_REQUEST == 1) {
Exception::redirect('error', $data, 5);
} else {
$ret = Sys::S('core.JsonReturn');
JsonReturn::output(FAIL, $data);
}
}
示例12: imgCheckcode
static function imgCheckcode()
{
Sys::S('core.VerifyCode.VerifyCode');
VerifyCode::getCode(6);
}