當前位置: 首頁>>代碼示例>>PHP>>正文


PHP option::uget方法代碼示例

本文整理匯總了PHP中option::uget方法的典型用法代碼示例。如果您正苦於以下問題:PHP option::uget方法的具體用法?PHP option::uget怎麽用?PHP option::uget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在option的用法示例。


在下文中一共展示了option::uget方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addset

function addset($name, $type, $x, $other = '', $text = '')
{
    if ($type == 'checkbox') {
        if (option::uget($x) == 1) {
            $other .= ' checked="checked"';
        }
        $value = '1';
    } else {
        $value = option::uget($x);
    }
    echo '<tr><td>' . $name . '</td><td><input type="' . $type . '" name="' . $x . '" value="' . $value . '" ' . $other . '>' . $text . '</td>';
}
開發者ID:pixode,項目名稱:Tieba-Cloud-Sign,代碼行數:12,代碼來源:set.php

示例2: mok_zdwk_set

function mok_zdwk_set()
{
    echo '<tr><td>附加簽到</td><td><input type="checkbox" name="mok_zdwk_wk" ';
    if (option::uget('mok_zdwk_wk')) {
        echo 'checked';
    }
    echo '> 簽到百度文庫<br/><input type="checkbox" name="mok_zdwk_zd" ';
    if (option::uget('mok_zdwk_zd')) {
        echo 'checked';
    }
    echo '> 簽到百度知道</td></tr>';
}
開發者ID:chajianku,項目名稱:mok_zdwk,代碼行數:12,代碼來源:mok_zdwk.php

示例3: cron_signtz_mail

function cron_signtz_mail()
{
    global $m;
    $today = date("Y-m-d");
    $lastday = option::get('haotian_mail');
    if ((time() - 1396281600) % 86400 < 21600) {
        return '未到發送郵件時間';
    }
    if ($today != $lastday) {
        option::set('haotian_mail', $today);
    } else {
        return '今日任務已經執行完畢';
    }
    $query = $m->query("SELECT * FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "users`");
    while ($fetch = $m->fetch_array($query)) {
        $mail = $fetch['email'];
        $name = $fetch['name'];
        $id = $fetch['id'];
        if (option::uget('haotian_mail_enable', $id) == 1) {
            $title = "[" . date("Y-m-d") . "] " . SYSTEM_NAME . " - {$name} - 簽到報告";
            $query2 = $m->query("SELECT * FROM  `" . DB_NAME . "`.`" . DB_PREFIX . "tieba` WHERE `uid`={$id}");
            $c = 0;
            $content = '<p class="sign_title">' . SYSTEM_NAME . ' - 簽到報告</p><p>' . date("Y-m-d") . '<br>站點地址:<a href="' . SYSTEM_URL . '">' . SYSTEM_URL . '</a>' . '<br>若有大量貼吧簽到失敗,建議您重新設置 Cookie 相關信息</p><table class="result_table"><thead><tr><td style="width: 40px">#</td><td>貼吧</td><td style="width: 75px">狀態</td><td style="width: 75px">經驗</td></tr></thead><tbody>';
            while ($ff = $m->fetch_array($query2)) {
                $c++;
                $tie8 = $ff['tieba'];
                $status = $ff['status'];
                $content .= "<tr><td>{$c}</td><td><a href=" . '"http://tieba.baidu.com/f?kw=' . urlencode($tie8) . '" target="_blank">' . $tie8 . '</a>' . "</td>";
                if ($status == 0) {
                    $content .= "<td>已簽到</td><td>+8</td>";
                } else {
                    $content .= "<td>簽到失敗</td><td>-</td>";
                }
                $content .= "</tr>";
            }
            $content .= "</tbody></table>";
            $content = '<style type="text/css">div.wrapper * { font: 12px "Microsoft YaHei", arial, helvetica, sans-serif; word-break: break-all; }div.wrapper a { color: #15c; text-decoration: none; }div.wrapper a:active { color: #d14836; }div.wrapper a:hover { text-decoration: underline; }div.wrapper p { line-height: 20px; margin: 0 0 .5em; text-align: center; }div.wrapper .sign_title { font-size: 20px; line-height: 24px; }div.wrapper .result_table { width: 85%; margin: 0 auto; border-spacing: 0; border-collapse: collapse; }div.wrapper .result_table td { padding: 10px 5px; text-align: center; border: 1px solid #dedede; }div.wrapper .result_table tr { background: #d5d5d5; }div.wrapper .result_table tbody tr { background: #efefef; }div.wrapper .result_table tbody tr:nth-child(odd) { background: #fafafa; }</style><div class="wrapper">' . $content . '</div><br><p style="font-size: 12px; color: #9f9f9f; text-align: right; border-top: 1px solid #dedede; padding: 20px 10px 0; margin-top: 25px;">此封郵件來自 百度貼吧雲簽到<br>Haotian Mail API v0.1, 2014 &copy; <a href="http://ihaotian.me/">Haotian\'s Laboratory</a>.</p>';
            if ($c == 0) {
                continue;
            }
            $x = misc::mail($mail, $title, $content);
            if ($x != true) {
                return '發送失敗,錯誤日誌:' . $x;
            }
        }
    }
    return '郵件發送成功!';
}
開發者ID:chajianku,項目名稱:haotian_signtz,代碼行數:48,代碼來源:send.php

示例4: cron_pch18_relist

function cron_pch18_relist()
{
    global $m;
    $query = $m->query("SELECT DISTINCT id,uid FROM `" . DB_PREFIX . "baiduid` ");
    while ($fetch = $m->fetch_array($query)) {
        $id = $fetch['id'];
        $uid = $fetch['uid'];
        $isqd_query = $m->query("SELECT * FROM `" . DB_PREFIX . "pch18_relist` where id=" . $id . " and lastdate='" . date("Y-m-d") . "'");
        $isqd_fetch = $m->fetch_array($isqd_query);
        $setqd = option::uget('pch18_relist_enable', $uid);
        if (!empty($setqd)) {
            //user表裏麵開啟簽到功能
            $r = misc::scanTiebaByPid($id);
            //更新列表函數
            $m->query("REPLACE INTO `" . DB_NAME . "`.`" . DB_PREFIX . "pch18_relist` SET `lastdate` = '" . date("Y-m-d") . "', id = " . $id);
        }
    }
}
開發者ID:chajianku,項目名稱:pch18_relist,代碼行數:18,代碼來源:run.php

示例5: pch18_relist_setting

function pch18_relist_setting()
{
    ?>
	<tr><td>自動刷新貼吧列表</td>
	<td>
	<input type="radio" name="pch18_relist_enable" value="1" <?php 
    if (option::uget('pch18_relist_enable') == 1) {
        echo 'checked';
    }
    ?>
 > 是&nbsp;
	<input type="radio" name="pch18_relist_enable" value="0" <?php 
    if (option::uget('pch18_relist_enable') != 1) {
        echo 'checked';
    }
    ?>
 > 否
	</td> 
    
	<?php 
}
開發者ID:chajianku,項目名稱:pch18_relist,代碼行數:21,代碼來源:pch18_relist.php

示例6: dl_yjtz_setting

function dl_yjtz_setting()
{
    global $m;
    ?>
	<tr><td>簽到郵件通知</td>
	<td>
	<input type="radio" name="dl_yjtz_enable" value="1" <?php 
    if (option::uget('dl_yjtz_enable') == 1) {
        echo 'checked';
    }
    ?>
 > 開啟簽到郵件通知<br/>
	<input type="radio" name="dl_yjtz_enable" value="0" <?php 
    if (option::uget('dl_yjtz_enable') != 1) {
        echo 'checked';
    }
    ?>
 > 關閉簽到郵件通知
	</td>
	<?php 
}
開發者ID:chajianku,項目名稱:dl_yjtz,代碼行數:21,代碼來源:dl_yjtz.php

示例7: haotian_signtz_setting

function haotian_signtz_setting()
{
    global $m;
    ?>
	<tr><td>開啟簽到郵件通知</td>
	<td>
	<input type="radio" name="haotian_mail_enable" value="1" <?php 
    if (option::uget('haotian_mail_enable') == 1) {
        echo 'checked';
    }
    ?>
 > 是&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="radio" name="haotian_mail_enable" value="0" <?php 
    if (option::uget('haotian_mail_enable') != 1) {
        echo 'checked';
    }
    ?>
 > 否
	</td>
	<?php 
}
開發者ID:chajianku,項目名稱:haotian_signtz,代碼行數:21,代碼來源:haotian_signtz.php

示例8: date

         if (!empty($setqd)) {
             //user表裏麵開啟簽到功能
             $r = misc::scanTiebaByPid($id);
             //更新列表函數
             $m->query("REPLACE INTO `" . DB_NAME . "`.`" . DB_PREFIX . "pch18_relist` SET `lastdate` = '" . date("Y-m-d") . "', id = " . $id);
         }
     }
     Redirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=pch18_relist&isok=已刷新完所有狀態為開啟的用戶貼吧列表');
     die;
 case 'wkq':
     //刷新未開啟用戶全部貼吧
     $query = $m->query("SELECT DISTINCT id,uid FROM `" . DB_PREFIX . "baiduid` ");
     while ($fetch = $m->fetch_array($query)) {
         $id = $fetch['id'];
         $uid = $fetch['uid'];
         $setqd = option::uget('pch18_relist_enable', $uid);
         if ($setqd != 1) {
             //user表裏麵開啟簽到功能
             $r = misc::scanTiebaByPid($id);
             //更新列表函數
             $m->query("REPLACE INTO `" . DB_NAME . "`.`" . DB_PREFIX . "pch18_relist` SET `lastdate` = '" . date("Y-m-d") . "', id = " . $id);
         }
     }
     Redirect(SYSTEM_URL . 'index.php?mod=admin:setplug&plug=pch18_relist&isok=已刷新完所有狀態為未開啟用戶貼吧列表');
     die;
 case 'kong':
     //刷新空賬戶
     $baid_ft = $m->query("SELECT id,uid FROM `" . DB_PREFIX . "baiduid`");
     while ($baid = $m->fetch_array($baid_ft)) {
         $uxs = $m->once_fetch_array("SELECT * FROM `" . DB_PREFIX . "users` where id=" . $baid['uid']);
         if ($uxs['t'] == '') {
開發者ID:MoeGakuen,項目名稱:pch18_relist,代碼行數:31,代碼來源:pch18_relist_setting.php

示例9: getGravatar

/**
 * 獲取當前用戶的Gravatar頭像或貼吧頭像
 * http://en.gravatar.com/site/implement/images/
 * @return bool|string
 */
function getGravatar($s = 140, $d = 'mm', $g = 'g', $site = 'moefont')
{
    if (option::uget('face_img') == 1) {
        if (option::uget('face_url') != '') {
            return option::uget('face_url');
        } else {
            return 'http://tb.himg.baidu.com/sys/portrait/item/';
        }
    } else {
        return gravatar(EMAIL, $s, $d, $g, $site);
    }
}
開發者ID:quericy,項目名稱:Tieba-Cloud-Sign,代碼行數:17,代碼來源:sfc.functions.php

示例10: getGravatar

/**
 * 獲取Gravatar頭像(或貼吧頭像)
 * http://en.gravatar.com/site/implement/images/
 * @return bool|string
 */
function getGravatar($s = 140, $d = 'mm', $g = 'g', $site = 'secure')
{
    if (option::uget('face_img') == 1) {
        if (option::uget('face_url') != '') {
            return option::uget('face_url');
        } else {
            return 'http://tb.himg.baidu.com/sys/portrait/item/';
        }
    } else {
        $hash = md5(EMAIL);
        $avatar = "https://{$site}.gravatar.com/avatar/{$hash}?s={$s}&r={$g}";
        return $avatar;
    }
}
開發者ID:pixode,項目名稱:Tieba-Cloud-Sign,代碼行數:19,代碼來源:sfc.functions.php

示例11: VALUES

                     if ($tb_max[0] < option::get('tb_max')) {
                         $m->query("INSERT INTO `" . DB_NAME . "`.`" . DB_PREFIX . TABLE . "` (`id`, `pid`, `uid`, `tieba`, `no`, `latest`) VALUES (NULL, {$pid} ,'" . UID . "', '{$v}', 0, 0);");
                     } else {
                         msg('錯誤:您的貼吧數量超過限製,無法刷新!');
                     }
                 }
             }
         }
         Redirect('index.php?mod=showtb&ok');
     }
     doAction('showtb_set');
     break;
 case 'set':
     // 獲取頭像的url
     if ($i['post']['face_img'] == 1 && $i['post']['face_baiduid'] != '') {
         $c = new wcurl('http://www.baidu.com/p/' . option::uget("face_baiduid"));
         $data = $c->get();
         $c->close();
         $i['post']['face_url'] = stripslashes(textMiddle($data, '<img class=portrait-img src=\\x22', '\\x22>'));
     }
     /*
     受信任的設置項,如果插件要使用係統的API去儲存設置,必須通過set_save1或set_save2掛載點掛載設置名
     具體掛載方法為:
     global $PostArray;
     $PostArray[] = '設置名';
     為了兼容舊版本,可以global以後檢查一下是不是空變量,為空則為舊版本
     */
     $PostArray = array('face_img', 'face_baiduid', 'face_url');
     doAction('set_save1');
     //更改郵箱
     if ($_POST['mail'] != $i['user']['email'] && !empty($_POST['mail'])) {
開發者ID:a395183830,項目名稱:Tieba-Cloud-Sign,代碼行數:31,代碼來源:setting.php


注:本文中的option::uget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。