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


PHP MySql::Instance方法代碼示例

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


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

示例1: Get

 static function Get($key = '')
 {
     if (count(self::$_settings) == 0) {
         self::$_settings = MySql::Instance()->QuickArray("SELECT * FROM settings");
     }
     if (self::$_settings[$key] != null) {
         return self::$_settings[$key];
     }
     return self::$_settings;
 }
開發者ID:samplugins,項目名稱:donation-system,代碼行數:10,代碼來源:settings.php

示例2: Login

<?php

/**
 * Login Checker
 *
 * @author      Sam Plugins <samplugins@gmail.com>
 * @copyright   Sam Plugins <samplugins@gmail.com>
 * @twitter     http://twitter.com/samplugins
 */
require_once "include/init.php";
if (CommonFunc::isPost()) {
    $Login = new Login(MySql::Instance());
    if ($Login->loginCheck(CommonFunc::safe($_POST['username']), CommonFunc::safe($_POST['password']))) {
        echo "<script>window.location='donations.php'</script>";
    } else {
        $_SESSION['login-flash'] = "" . CommonFunc::ERROR . "|Invalid username and/or password";
        echo "<script>window.location='login.php'</script>";
    }
}
開發者ID:samplugins,項目名稱:donation-system,代碼行數:19,代碼來源:loginCheck.php

示例3: db

 function db()
 {
     return MySql::Instance();
 }
開發者ID:samplugins,項目名稱:donation-system,代碼行數:4,代碼來源:class.paging.php

示例4: modDonations

<?php

$oDonation = new modDonations(MySql::Instance());
$donation_data = $oDonation->getPendingDonationData(session_id());
$donation_id = (int) $donation_data['donation_id'];
$q = CommonFunc::security_question();
$style_form = '';
$style_preview_form = ' style="display:none;"';
$preview_applicable = false;
$security_code = '';
if ($donation_id > 0 && isset($_GET['p']) && $_GET['p'] == 1) {
    $style_preview_form = '';
    $style_form = ' style="display:none;"';
    $preview_applicable = true;
    $security_code = $q['a'];
}
?>

    <div id="div_donation_form"<?php 
echo $style_form;
?>
>
        <div id="donate_response_div" class="reponse_div no_display"></div>
        <form method="post" id="donate_form" action="php/preview-process.php" class="WebForm">
            <h2>Your Details</h2>

            <p>
                    <label>First Name <em>*</em> <em id="err_first_name" class="error">required</em></label>
                <span><input type="text" id="first_name" value="<?php 
echo $donation_data['first_name'];
?>
開發者ID:samplugins,項目名稱:donation-system,代碼行數:31,代碼來源:donation-form.php

示例5: while

        <thead>
        <tr>
            <th width="2%" align="left"><input type='checkbox' name='checkall' onclick='checkUncheckAll(this);' class="check_radio" /></th>
            <th width="15%" align="left">First Name</th>
            <th width="15%" align="left">Last Name</th>
            <th width="10%" align="center">Email</th>
            <th width="20%" align="center">Date</th>
            <th width="10%" align="center">Amount</th> 
            <th width="20%" align="center">Status</th>
            <th width="28%" align="center">Action</th>
        </tr>
        </thead>
        <tbody>
        <?php 
    $i = 0;
    while ($donation = MySql::Instance()->myArray($paging->result)) {
        $class = CommonFunc::tr_class($i);
        ?>
        <tr class="<?php 
        echo $class;
        ?>
">
            <td width="2%">
                <input type='hidden' name='visible_donation_ids[]' value='<?php 
        echo $donation['donation_id'];
        ?>
' />
                <input type='checkbox' name='donation_ids[]' value='<?php 
        echo $donation['donation_id'];
        ?>
' class="check_radio" /></td>
開發者ID:samplugins,項目名稱:donation-system,代碼行數:31,代碼來源:donations.php

示例6: modDonations

<?php

/**
 * Delete Donation
 *
 * @author      Sam Plugins <samplugins@gmail.com>
 * @copyright   Sam Plugins <samplugins@gmail.com>
 * @twitter     http://twitter.com/samplugins
 */
require_once "include/init.php";
if (CommonFunc::isGet() && isset($_GET['id'])) {
    $contact = new modDonations(MySql::Instance());
    if ($contact->Delete($_GET['id'])) {
        $_SESSION['contact-request-flash'] = "" . CommonFunc::SUCCESS . "|Entry deleted successfully.";
    } else {
        $_SESSION['contact-request-flash'] = "" . CommonFunc::ERROR . "|Entry couldn't be deleted";
    }
    CommonFunc::redirect("donations.php");
} else {
    echo "Invalid request!";
}
開發者ID:samplugins,項目名稱:donation-system,代碼行數:21,代碼來源:delete_donation.php

示例7: _process

 private function _process()
 {
     $sql = "UPDATE admin_users SET password = '" . md5($this->_data['new_password']) . "' WHERE username = '" . $_SESSION['user'] . "'";
     MySql::Instance()->query($sql);
 }
開發者ID:samplugins,項目名稱:donation-system,代碼行數:5,代碼來源:class.passwordform.handler.php


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