Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
<?php

/**
 * Login Checker
 *
 * @author      Sam Plugins <*****@*****.**>
 * @copyright   Sam Plugins <*****@*****.**>
 * @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>";
    }
}
Ejemplo n.º 3
0
 function db()
 {
     return MySql::Instance();
 }
Ejemplo n.º 4
0
<?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'];
?>
Ejemplo n.º 5
0
        <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>
Ejemplo n.º 6
0
<?php

/**
 * Delete Donation
 *
 * @author      Sam Plugins <*****@*****.**>
 * @copyright   Sam Plugins <*****@*****.**>
 * @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!";
}
 private function _process()
 {
     $sql = "UPDATE admin_users SET password = '******'new_password']) . "' WHERE username = '******'user'] . "'";
     MySql::Instance()->query($sql);
 }