本文整理汇总了PHP中CRUD::args_output方法的典型用法代码示例。如果您正苦于以下问题:PHP CRUD::args_output方法的具体用法?PHP CRUD::args_output怎么用?PHP CRUD::args_output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRUD
的用法示例。
在下文中一共展示了CRUD::args_output方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
protected static function form($rowCount = 5)
{
CRUD::args_output(true, true);
$rsnum = CRUD::dataFetch('feedback', array('status' => '1'), false, array('createdate' => 'desc'));
if (!empty($rsnum)) {
$dataRow = CRUD::$data;
foreach ($dataRow as $row) {
$scoreArray[] = $row['score'];
$socreCount[$row['score']]++;
}
# 計算平均總分
$averge = round(array_sum($scoreArray) / $rsnum, 1);
list($mainScore, $subScore) = explode('.', $averge);
}
VIEW::assignGlobal(array('VALUE_TOTAL' => empty($rsnum) ? 0 : $rsnum, 'VALUE_AVERGE_MAIN' => empty($mainScore) ? 0 : $mainScore, 'VALUE_AVERGE_SUB' => empty($subScore) ? 0 : $subScore));
if (is_array($socreCount)) {
$s = 6;
while (--$s > 0) {
VIEW::newBlock('TAG_SOCRE_LINE');
$number = empty($socreCount[$s]) ? '0' : $socreCount[$s];
VIEW::assign(array('VALUE_SCORE_PERCENT' => round(100 / $rsnum * $number) . '%', 'VALUE_SOCRE_COUNT' => $s, 'VALUE_SCORE_NUMBER' => $number));
}
}
$schemaReview = self::row($rowCount);
SCHEMA::make('feedback', array('count' => $rsnum, 'score' => $averge, 'review' => $schemaReview));
}
示例2: insert
private static function insert()
{
CHECK::is_must($_POST["callback"], $_POST["subject"], $_POST["cateID"]);
if (CHECK::is_pass()) {
CRUD::dataInsert('ad', $_POST, true, false, true);
if (!empty(DB::$error)) {
CRUD::args_output();
$msg = DB::$error;
$path = CORE::$manage . 'ad/add/';
} else {
$msg = self::$lang["modify_done"];
$path = CORE::$manage . 'ad/';
}
} else {
CRUD::args_output();
$msg = CHECK::$alert;
$path = CORE::$manage . 'ad/add/';
}
CORE::msg($msg, $path);
}
示例3: add
private static function add($m_id = false)
{
$recaptcha = self::recaptcha();
CHECK::is_must($_POST["name"], $_POST["tel"], $_POST["content"]);
CHECK::is_email($_POST["email"]);
if ($recaptcha && CHECK::is_pass()) {
$args = array('m_id' => !empty($m_id) ? $m_id : "null", 'content' => htmlspecialchars($_POST["content"], ENT_NOQUOTES));
$args = array_merge($_POST, $args);
CRUD::dataInsert('contact', $args);
if (!empty(DB::$error)) {
$msg = DB::$error;
} else {
foreach ($_POST as $field => $var) {
switch ($field) {
case "subject":
$subjectmail = self::subjectFetch($var, 'email');
$var = self::subjectFetch($var, 'subject');
break;
case "gender":
$var = empty($var) ? CORE::$lang["female"] : CORE::$lang["male"];
break;
}
VIEW::assignGlobal('VALUE_' . strtoupper($field), $var);
}
$msg = CORE::$lang["submit_done"];
$mail_temp = 'ogs-mail-contact-tpl.html';
# 信件樣板
new VIEW($mail_temp, false, true, false);
$fromMail = !empty($subjectmail) ? $subjectmail : SYSTEM::$setting["email"];
CORE::mail_handle($_POST["email"], $fromMail, VIEW::$output, CORE::$lang["contact_mail"], SYSTEM::$setting["name"]);
# 寄出認證信
$rs = true;
}
} else {
$msg = CHECK::$alert;
if (empty($recaptcha)) {
$msg = '請勾選驗證';
}
CRUD::args_output();
}
if ($rs) {
RESPONSE::register($_POST, CORE::$root . 'contact/thankyou/');
exit;
} else {
CORE::msg($msg, CORE::$root . 'contact/');
}
}
示例4: regist
private static function regist()
{
$account_check = CRUD::dataFetch('member', array('account' => $_POST["account"]));
CHECK::is_password($_POST["password"]);
CHECK::is_same($_POST["password"], $_POST["password_match"]);
CHECK::is_must($_POST["name"], $_POST["callback"]);
CHECK::is_email($_POST["account"]);
if (CHECK::is_pass() && empty($account_check)) {
# 預設值 / 更改
$insert_args = $_POST;
$insert_args["password"] = md5($_POST["password"]);
$insert_args["createdate"] = date("Y-m-d H:i:s");
CRUD::dataUpdate('member', $insert_args);
if (!empty(DB::$error)) {
CRUD::args_output();
CORE::msg(DB::$error, CORE::$root . 'member/regist/');
} else {
# 註冊成功,發送驗證信
$verify_temp = 'ogs-mail-verify-tpl.html';
# 信件樣板
$m_id = DB::get_id();
# 取得 id
$verify_code = md5($_POST["account"] . $insert_args["password"] . $insert_args["createdate"] . $m_id);
# 組合認證碼
$verify_path = 'http://' . CORE::$cfg["url"] . CORE::$root . "member/verify/{$verify_code}/";
# 組合認證路徑
CRUD::dataUpdate('member', array('verify_code' => $verify_code, 'id' => $m_id));
# 儲存認證碼
# 輸出認證信樣板
VIEW::assignGlobal('VALUE_VERIFY_PATH', $verify_path);
new VIEW($verify_temp, false, true, false);
CORE::mail_handle(SYSTEM::$setting["email"], $_POST["account"], VIEW::$output, CORE::$lang["regist_mail"], SYSTEM::$setting["name"]);
# 寄出認證信
CORE::msg(CORE::$lang["regist_done"], CORE::$root . 'member/');
# 完成訊息
return true;
}
} else {
CRUD::args_output();
if (!empty($account_check)) {
CORE::msg(CORE::$lang["account_exist"], CORE::$root . 'member/regist/');
return false;
}
if (empty($referrals_check)) {
CORE::msg(CORE::$lang["referrals_none"], CORE::$root . 'member/regist/');
return false;
}
if ($referrals_count >= 2) {
CORE::msg(CORE::$lang["referrals_max"], CORE::$root . 'member/regist/');
return false;
}
if (empty($verify_check)) {
CORE::msg(CORE::$lang["verify_error"], CORE::$root . 'member/regist/');
return false;
}
CORE::msg(CHECK::$alert, CORE::$root . 'member/regist/');
}
}