1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/web3d-yuncart

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
util.php 1.2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
web3d Отправлено 18.03.2017 14:40 1e9b584
<?php
define("IN_CART", true);
define("SITEPATH", dirname(__FILE__));
require_once SITEPATH . "/init.php";
$action = isset($_GET['action']) ? strtolower(trim($_GET["action"])) : "";
if (!in_array($action, array("seccode", "send", "district", "zip"))) {
die();
}
switch ($action) {
case 'seccode'://验证码
Image::ImageVerify();
break;
case 'send': //发送
$type = trim($_GET["type"]);
if (!in_array($type, array("email", "sms")))
exit();
csetcookie("send" . $type, '1', 300);
//判断发送条件
$lockfile = DATADIR . "/lock/" . "send{$type}.lock";
@$filemtime = filemtime($lockfile);
if (time() - $filemtime < 5)
exit(); // 5s内
touch($lockfile);
set_time_limit(0);
$send = new Send($type);
$send->dosend();
break;
case 'district':
$pid = intval($_GET["pid"]);
$districts = Dis::getDistrict($pid);
exit($districts ? json_encode($districts) : "failure");
break;
case 'zip':
$districtid = intval($_GET["districtid"]);
$zip = Dis::getZip($districtid);
exit($zip);
break;
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/web3d-yuncart.git
git@api.gitlife.ru:oschina-mirror/web3d-yuncart.git
oschina-mirror
web3d-yuncart
web3d-yuncart
master