function selectSomeSingle($page,$fileds,$field,$id){ $connector = new DbConnector(); $query = 'SELECT '.$fields.' FROM '.$page.' WHERE '.$field.'='.$id; $sqlrs=$connector->query($get_data); while ($row=$connector->fetchArray($sqlrs)) { $data['id'] = $row['id']; }; return $data; }
function insertNew($table,$fields,$values,$db_location, $db_user,$db_pass,$db_db){ $connector = new DbConnector($db_location, $db_user,$db_pass,$db_db); $query = 'INSERT INTO '.$table.' ('.$fields.') VALUES('.$values.')'; if($connector->query($query)){ $data = 'Your post was entered succesfully'; }else{ $data = 'Sorry, there was an error with your post :(.'; }; return $data; }
function updateField($table,$setFields,$where,$db_location, $db_user,$db_pass,$db_db){ $connector = new DbConnector($db_location, $db_user,$db_pass,$db_db); $query = 'UPDATE '.$table.' SET '.$setFields.' WHERE '.$where; if($connector->query($query)){ $data = 'Your update was successful!'; }else{ $data = 'Sorry, there was an error with your update :('; }; return $data; }
function deleteRow($table,$where,$db_location, $db_user,$db_pass,$db_db){ $connector = new DbConnector($db_location, $db_user,$db_pass,$db_db); $query = 'DELETE FROM '.$table.' WHERE '.$where; if($connector->query($query)){ $data = 'Your post was deleted succesfully'; }else{ $data = 'Sorry, there was an error with your deletion :(.'; }; return $data; }
/** * Gets the SQL DELETE statement. * * @return string */ private function _getDeleteStatement() { $tableName = Db::quoteId($this->_tableName); $pkName = Db::quoteId($this->_primaryKey->getName()); $pkValue = $this->_db->quote($this->_primaryKey->getValue()); return "delete from {$tableName} where {$pkName} = {$pkValue}"; }
/** * save User ACL settings */ public function updateACL($section = '') { $id = $this->obj->getUid(); if (!$id) { return false; } $objLst = new AclModel(); $objLst->connectDb(); if (is_string($section)) { $objLst->where("section='{$section}'"); } if (!$objLst->loadList()) { return false; } $i = 0; $fc = FrontController::getInstance(); $db = DbConnector::getConnection(); $table = $objLst->dbTable('acl_user'); while ($objLst->next()) { if ($fc->getReqVar('acl_' . $objLst->get('name'))) { $db->query('INSERT IGNORE INTO `' . $table . '` SET `user_id`=' . $id . ', `acl_id`=' . $objLst->getUid()); } else { $db->query('DELETE IGNORE FROM `' . $table . '` WHERE `user_id`=' . $id . ' AND `acl_id`=' . $objLst->getUid()); } $i++; } return $i; }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct() { parent::__construct(); // set default dif version $this->setDifVersion(DIF_VERSION); $this->installPath = realpath(DIF_WEB_ROOT . "plugins") . "/"; $this->initialize(); }
public function __construct() { parent::__construct(); $this->connector = new MySqlConnector(); if (empty(self::$dbstring)) { self::$dbstring = $this->connector->dbConnect(); } }
/** * the getInstance() method returns a single instance of the object */ public static function getInstance() { if (!isset(self::$instance)) { $object = __CLASS__; self::$instance = new $object(); } return self::$instance; }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct() { parent::__construct(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('login_request', 'a'); $this->sqlParser->addField(new SqlField('a', 'login_key', 'request_key', 'Request key', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'login_usr_id', 'usr_id', 'User', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'login_ts', 'ts', 'Modified', SqlParser::getTypeSelect() | SqlParser::MOD_INSERT, SqlField::TYPE_DATE, true)); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct() { parent::__construct(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('reservation_userlink', 'a'); $this->sqlParser->addField(new SqlField('a', 'lnk_usr_id', 'usr_id', 'User id', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_grp_id', 'grp_id', 'Group id', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'lnk_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); }
private function connectExe() { $dsn = 'mysql:host=' . $this->HOST . ';dbname=' . $this->DB_NAME; try { self::$connect = new PDO($dsn, $this->USER, $this->PASSWORD, $this->OPT); } catch (PDOException $e) { self::$isSuccessful = false; echo 'ERROR:подключение:' . $e->getMessage() . '<br>'; } }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct() { parent::__construct(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('news_tree_ref', 'a'); $this->sqlParser->addField(new SqlField('a', 'news_tree_id', 'tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_tag', 'tag', 'Tag', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'news_ref_tree_id', 'ref_tree_id', 'Node', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_usr_id', 'usr_id', 'Gebruiker', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'news_ts', 'ts', 'Gewijzigd', SqlParser::getTypeSelect(), SqlField::TYPE_DATE)); }
/** * Constructor * * Reads project's and default .ini file, sets project handler's * and initializes paths. * @param location config file */ public function __construct() { parent::__construct(); $this->sqlParser->setSelect('select'); $this->sqlParser->setTable('form_record_item', 'a'); $this->sqlParser->addField(new SqlField('a', 'item_id', 'id', 'Id', SqlParser::getTypeSelect() | SqlParser::PKEY, SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'item_rcd_id', 'rcd_id', 'Record id', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'item_elm_id', 'elm_id', 'Element id', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'item_classname', 'classname', 'Class name', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'item_weight', 'weight', 'Index', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_INTEGER, true)); $this->sqlParser->addField(new SqlField('a', 'item_name', 'name', 'Name', SqlParser::getTypeSelect() | SqlParser::getTypeModify() | SqlParser::NAME, SqlField::TYPE_STRING, true)); $this->sqlParser->addField(new SqlField('a', 'item_value', 'value', 'Waarde', SqlParser::getTypeSelect() | SqlParser::getTypeModify(), SqlField::TYPE_STRING, false)); $this->sqlParser->addFrom("inner join form_record as b on b.rcd_id = a.item_rcd_id"); }
$subDir = $dir[0] === DIRECTORY_SEPARATOR ? '/' : ''; for ($i = 0; $i < $n; $i++) { $item = $arr[$i]; $subDir .= (strlen($subDir) === 0 || $subDir === '/' ? '' : '/') . $item; } return $subDir; } $currentDir = __DIR__; // определяем верхний уровень $topDir = realpath($currentDir); $dirProject = subDir($topDir, -1); // голова проекта // -1 - убираем php - файл . -2 - ещё на уровень выше $topHtmlDir = subDir($_SERVER['PHP_SELF'], -2); $firstSymb = $topHtmlDir[0]; // подключаем класс TaskStore - общие параметры $dirService = $topDir . '/service'; include_once $dirService . '/TaskStore.php'; include_once $dirService . '/DbConnector.php'; include_once $dirService . '/Message.php'; include_once $dirService . '/TaskParameters.php'; include_once __DIR__ . '/setUp.php'; //------ подключение БД -------------// $pdo = DbConnector::getConnect(); if (!DbConnector::$isSuccessful) { die('EXIT'); } TaskStore::init($topDir, $topHtmlDir, $dirProject); // подключаем autoLoad - авт подключение классов include_once $dirService . '/autoload.php'; //-------------------------------------------//
return $amount; case "PPC": $amount = $amount * 1000; $currency = "mPPC"; return $amount; case "mPPC": return $amount; case "DRK": $amount = $amount * 1000; $currency = "mDRK"; return $amount; case "mDRK": return $amount; } } $db = new DbConnector(); $db->queryres("select * from tbl_config where header='currency'"); $faucetcurrency = $db->res['value']; $db->queryres("select * from tbl_config where header='pusername'"); $pusername = $db->res['value']; $db->queryres("select * from tbl_config where header='papiname'"); $papiname = $db->res['value']; $db->queryres("select * from tbl_config where header='ppassword'"); $ppassword = $db->res['value']; $db->queryres("select * from tbl_config where header='requestcount'"); $requestcount = $db->res['value']; $api = new AsmoneyAPI($pusername, $papiname, $ppassword); //Change to mili bitcoin because asmoney get currencies based on milicoin $db->query("select * from tbl_withdrawal where status=0"); $btcaddresses = array(); $btcamounts = array();
<?php require_once "header.php"; require_once "../includes/dbconnector.class.php"; $db = new DbConnector(); if (isset($_GET['a']) && $_GET['a'] == 'deac') { $did = $_GET['did']; $db->query("update tbl_donate set status=1 where donate='{$did}'"); header('Location:donate.php'); } elseif (isset($_GET['a']) && $_GET['a'] == 'ac') { $did = $_GET['did']; $db->query("update tbl_donate set status=2 where donate='{$did}'"); header('Location:donate.php'); } else { $db2->queryres("select * from tbl_config where header='minimum_donate'"); ?> <section id="main-content"> <section class="wrapper"> <div class="row"> <div class="col-lg-12"> <section class="panel"> <div class="panel-body progress-panel"> <div class="task-progress"> <h1>Donate</h1> </div> </div>
} elseif ($_GET['step'] == 2) { if (isset($_POST['dbname'])) { class SystemComponent { private $settings; function getSetting() { $settings['dbhost'] = $_POST['dbhost']; $settings['dbusername'] = $_POST['uname']; $settings['dbpassword'] = $_POST['pwd']; $settings['dbname'] = $_POST['dbname']; return $settings; } } require_once "includes/dbconnector.class.php"; $db = new DbConnector(); if ($db->check_connection()) { $dbhost = $_POST['dbhost']; $dbusername = $_POST['uname']; $dbpassword = $_POST['pwd']; $dbname = $_POST['dbname']; function generateRandomString($length = 25) { $characters = 'abcdefghijklmnopqrstuvwxyz123456789'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; }
/** * * @param int $ID * @return array */ protected function getNewGuestContact($ID) { try { $pdo = new DbConnector(); $newGuestContact = $pdo->prepare("SELECT * FROM `orders` where orders_id = ?"); $newGuestContact->execute(array($cID)); $tmp = $newGuestContact->fetchAll(); foreach ($tmp as $row) { if ($row['customers_gender'] == 'm') { $gender = true; } else { $gender = false; } if ($row['customers_vat_id_status'] != null && $row['customers_vat_id_status'] == 1) { $iscompany = true; $vatid = $row['customers_vat_id']; $company = $row['customers_company']; } else { $iscompany = false; $vatid = ''; $company = ''; } $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('ids', 'string'), 'value' => new xmlrpcval($row['customers_id'], 'int')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('cname', 'string'), 'value' => new xmlrpcval($row['customers_name'], 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('taxnumber', 'string'), 'value' => new xmlrpcval($vatid, 'int')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('street', 'string'), 'value' => new xmlrpcval($row['customers_street_address'], 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('zip', 'string'), 'value' => new xmlrpcval($row['customers_postcode'], 'int')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('city', 'string'), 'value' => new xmlrpcval($row['customers_city'], 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('mainphone', 'string'), 'value' => new xmlrpcval($row['customers_telephone'], 'int')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('mailaddress', 'string'), 'value' => new xmlrpcval($row['customers_email_address'], 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('company', 'string'), 'value' => new xmlrpcval($company, 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('country', 'string'), 'value' => new xmlrpcval($row['customers_country'], 'string')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('ismale', 'string'), 'value' => new xmlrpcval($gender, 'boolean')), 'struct'); $gesamteContacts[] = new xmlrpcval(array('id' => new xmlrpcval($i, 'int'), 'key' => new xmlrpcval('iscompany', 'string'), 'value' => new xmlrpcval($iscompany, 'boolean')), 'struct'); $i++; } return $gesamteContacts; } catch (PDOException $e) { throw new exception($e->getMessage()); } }
<?php session_start(); ob_start(); require_once "includes/dbconnector.class.php"; require_once "includes/user.class.php"; require_once "includes/function.php"; require "includes/smarty/Smarty.class.php"; $db = new DbConnector(); $db2 = new DbConnector(); $smarty = new Smarty(); $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $db->queryres("select * from tbl_config where header='privkey'"); $privkey = $db->res['value']; $db->queryres("select * from tbl_config where header='verkey'"); $verkey = $db->res['value']; $db->queryres("select * from tbl_config where header='hashkey'"); $hashkey = $db->res['value']; $ip = get_ip(); $ip = sprintf('%u', ip2long($ip)); define('NOW', time()); define(FILE, basename(basename($_SERVER['SCRIPT_FILENAME']), '.php')); if (isset($_SESSION['user']['logged'])) { $uid = $_SESSION['user']['uid']; $user = new User($uid); $userdet = $user->detail(); }
<?php /** * @author asmalindi * @copyright 2011 */ // Get the PHP file containing the DbConnector class require_once 'DbConnector.php'; // Create an instance of DbConnector $connector = new DbConnector(); // Use the query function of DbConnector to run a database query $result = $connector->query('SELECT firstname FROM customers'); // Get the result $row = $connector->fetchArray($result); // Show it to the user echo $row['firstname'];
case 'get_settings': header('Content-type: application/json'); $out->data = json_decode(file_get_contents('data/d1920.json')); $out->result = 'success'; $out->type = 'settings'; $result = json_encode($out); break; case 'data': include 'cl/DbConnector.php'; $ctr = new DbConnector(); $result = json_encode($ctr->process($a, $data, $opt)); header('Content-type: application/json'); break; case 'get_all_data': include 'cl/DbConnector.php'; $ctr = new DbConnector(); $result = json_encode($ctr->getAllData()); header('Content-type: application/json'); break; case 'screen': include 'cl/Screen.php'; $ctr = new Screen(); $result = $ctr->process($a, $data); break; case 'login': include 'gateway.php'; exit; break; } if ($result) { echo $result;
<?php require_once "header.php"; require_once "../includes/dbconnector.class.php"; $db = new DbConnector(); if (isset($_POST['save'])) { $db->query("update tbl_config set value='" . $_POST['referral_percent'] . "' where header='referral_percent'"); $db->query("update tbl_config set value='" . $_POST['timer'] . "' where header='timer'"); $db->query("update tbl_config set value='" . $_POST['currency'] . "' where header='currency'"); $db->query("update tbl_config set value='" . $_POST['donate_type'] . "' where header='donate_type'"); $db->query("update tbl_config set value='" . $_POST['donate_min'] . "' where header='donate_min'"); $db->query("update tbl_config set value='" . $_POST['privkey'] . "' where header='privkey'"); $db->query("update tbl_config set value='" . $_POST['verkey'] . "' where header='verkey'"); $db->query("update tbl_config set value='" . $_POST['hashkey'] . "' where header='hashkey'"); $db->query("update tbl_config set value='" . $_POST['pusername'] . "' where header='pusername'"); $db->query("update tbl_config set value='" . $_POST['papiname'] . "' where header='papiname'"); $db->query("update tbl_config set value='" . $_POST['ppassword'] . "' where header='ppassword'"); $db->query("update tbl_config set value='" . $_POST['STORE_NAME'] . "' where header='STORE_NAME'"); $db->query("update tbl_config set value='" . $_POST['AsMoneymin'] . "' where header='AsMoneymin'"); $db->query("update tbl_config set value='" . $_POST['currencymin'] . "' where header='currencymin'"); $db->query("update tbl_config set value='" . $_POST['minimum_donate'] . "' where header='minimum_donate'"); $db->query("update tbl_config set value='" . $_POST['sci_username'] . "' where header='sci_username'"); $db->query("update tbl_config set value='" . $_POST['sci_pass'] . "' where header='sci_pass'"); $db->query("update tbl_config set value='" . $_POST['requestcount'] . "' where header='requestcount'"); header('Location:setting.php'); } else { ?> <section id="main-content"> <section class="wrapper">
<?php require_once "header.php"; $db2 = new DbConnector(); if (isset($_GET['a']) && $_GET['a'] == 'delete') { $id = $_GET['id']; $db->query("delete from tbl_user where user_id='{$id}'"); header('Location: user.php'); } else { ?> <table class="table table-hover table-striped" width="100%"> <tr align="center"> <td width="1%">#</td> <td width="44%">wallet</td> <td width="18%">No. Referred</td> <td width="31%">No. Plays</td> <td width="6%"></td> </tr> <tbody> <?php $perpage = 50; if (!isset($_GET['p'])) { $screen = 0; } else { $screen = $_GET['p'] - 1; } $start = $screen * $perpage;
<?php require_once "header.php"; require_once "../includes/dbconnector.class.php"; $db = new DbConnector(); if (isset($_POST['new_price'])) { $prize = $_POST['prize']; $prepare = $db->mysqli->prepare("insert into tbl_prize (prize) values (?) "); $prepare->bind_param('d', $prize); $prepare->execute(); $prepare->close(); header('Location: prize.php'); } elseif (isset($_GET['a']) && $_GET['a'] == 'prize_up') { $pid = $_GET['pid']; $prepare = $db->mysqli->prepare("update tbl_prize set chance=chance+1 where prize_id=? "); $prepare->bind_param('i', $pid); $prepare->execute(); header('Location: prize.php'); } elseif (isset($_GET['a']) && $_GET['a'] == 'prize_down') { $pid = $_GET['pid']; $prepare = $db->mysqli->prepare("update tbl_prize set chance=chance-1 where prize_id=? "); $prepare->bind_param('i', $pid); $prepare->execute(); header('Location: prize.php'); } elseif (isset($_GET['a']) && $_GET['a'] == 'prize_downdd') { $pid = $_GET['pid']; $prepare = $db->mysqli->prepare("update tbl_prize set chance=chance-20 where prize_id=? "); $prepare->bind_param('i', $pid); $prepare->execute(); header('Location: prize.php'); } elseif (isset($_GET['a']) && $_GET['a'] == 'prize_downddd') {
class SystemComponent{ \tprivate \$settings; \tfunction getSetting(){ \t\t\t\$settings['dbusername']='******'; \t\t\t\$settings['dbpassword']='******'; \t\t\t\$settings['dbname']='{$dbname}'; \t\t\t\$settings['dbhost']='{$host}'; \t\t\treturn \$settings; \t} } END; $fp = fopen('includes/system.class.php', "w"); fwrite($fp, $config); fclose($fp); include_once "includes/dbconnector.class.php"; $db = new DbConnector(); $filename = 'phpfaucet.sql'; $templine = ''; $lines = file($filename); foreach ($lines as $line) { if (substr($line, 0, 2) == '--' || $line == '') { continue; } $templine .= $line; if (substr(trim($line), -1, 1) == ';') { $db->query($templine); $templine = ''; } } echo "Tables imported successfully"; echo "<br>Do not resubmit this file.<br>DELETE IMMEDIATELY.";
<?php require_once "maincore.php"; require_once "includes/dbconnector.class.php"; $db = new DbConnector(); $pid = $_POST['PAYMENT_ID']; if ($_POST['PAYMENT_STATUS'] == 'Complete') { $db->query("update tbl_dobate set status=1 where md5(donate)='{$pid}' "); $_SESSION['succ']['donate'] = true; } else { $_SESSION['succ']['penging'] = true; } header('Location:donate.php');
public function __construct() { parent::__construct(); }
<?php require_once "header.php"; require_once "maincore.php"; require_once "includes/solvemedialib.php"; require_once "includes/dbconnector.class.php"; $db = new DbConnector(); if (isset($_POST['claim'])) { $solvemedia_response = solvemedia_check_answer($verkey, $_SERVER["REMOTE_ADDR"], $_POST['adcopy_challenge'], $_POST['adcopy_response'], $hashkey); if ($solvemedia_response->is_valid) { $db2->query("select * from tbl_prize order by chance desc "); while ($res2 = $db2->fetchArray()) { $prize .= $res2['prize'] . '*' . $res2['chance'] . ','; } if (!isset($_SESSION['prize'])) { $_SESSION['prize'] = chance_creator($prize); } $db->queryres("select * from tbl_config where header='timer'"); $timer = NOW + $db->res['value'] * 60; $db->query("update tbl_user set credit=credit+'" . $_SESSION['prize'] . "',reset='{$timer}',ip='{$ip}' where user_id='{$uid}'"); $rid = $userdet['parent_id']; if ($rid) { $db->queryres("select * from tbl_config where header='referral_percent'"); $profit = $_SESSION['prize'] * $db->res['value'] / 100; $db->query("update tbl_user set credit=credit+'{$profit}' where user_id='{$rid}'"); } $_SESSION['user']['win'] = $_SESSION['prize']; unset($_SESSION['prize']); header('Location:index.php'); } else { unset($_SESSION['succ']);
public function __construct() { parent::__construct(); $this->director->attach($this); }