Example #1
0
	/**
	* Increment a key in the keystore by the given value. If the key does not exist, it will be set to $value. An existing key's value will be treated as an int so this may destroy existing string data if used improperly
	*
	* @param string $key key to increment
	* @param int $value new value
	* @throws Interspire_KeyStore_Exception
	*/
	public function increment($key, $value = 1)
	{
		$query = "INSERT INTO `[|PREFIX|]keystore` (`key`, `value`) VALUES ('" . $this->db->Quote($key) . "', '" . $value . "') ON DUPLICATE KEY UPDATE `value` = CAST(`value` AS SIGNED) + VALUES(`value`)";
		$result = $this->db->Query($query);
		if (!$result) {
			throw new Interspire_KeyStore_Exception($this->db->GetErrorMsg());
		}

		return (int)$this->get($key);
	}
Example #2
0
}
if ($_SERVER['PHP_SELF'] == '/xebura/home.php') {
    include_once 'config.php';
} else {
    include_once 'include/config.php';
}
require_once "language/lang.php";
require_once "class/dbclass.php";
require_once "class/email.class.php";
require_once "class/onlineclass.php";
require_once 'Smarty.class.php';
require_once 'variable.php';
require_once 'imagefunction.php';
require_once 'common_functions.php';
if (@(!$db)) {
    $db = new mysqldb();
}
if (@(!$onl)) {
    $onl = new onlinedb();
}
if (@(!$smarty)) {
    $smarty = new Smarty();
}
if (@(!$mailobj)) {
    $mailobj = new MyEmail();
}
require_once 'language/smarty_assign.php';
if (!isset($hide_side_menu) || $hide_side_menu == true) {
    require_once 'sidemenu_details.php';
}
require_once 'validation.php';
Example #3
0
//
// Author: Xebura Corporation
//
// (c) Copyright:
//               Xebura Corporation
//               256 South Robertson Blvd
//               Beverly Hills, CA 90211
//               USA
//               www.xebura.com
//               hello@xebura.com
//============================================================+
// script to get links, add them to the link table and replace them
require 'class/dbclass.php';
include_once 'include/config.php';
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
//$cid = '7';
//$mid = '1';
//$eid = '1';
$now = date('Y-m-d G:i:s', strtotime("now"));
// should be dynamic, what happened here? jlr 19-08-12 -- needs to be fixed.
//$msg_html = '<p>Here is my test message. I am going to show you some links....</p>
//<p>Here is <a href="http://www.google.com/">Google</a></p>
//<p>and <a href="http://yahoo.com">Yahoo</a></p>
//<p>and this is an email address - <a href="mailto:hello@xebura.com">hello@xebura.com</a></p>
//<p>and a link to a <a href="http://www.seagate.com/content/pdf/whitepaper/D2c_tech_paper_intc-stx_sata_ncq.pdf">PDF</a>... </p>';
// URL REPLACEMENT PART 1
//extract all a tag href= urls to an array
$var = $msg_html;
preg_match_all("/a[\\s]+[^>]*?href[\\s]?=[\\s\"\\']+" . "(.*?)[\"\\']+.*?>" . "([^<]+|.*?)?<\\/a>/", $var, &$matches);
$matches = $matches[1];
Example #4
0
//
// (c) Copyright:
//               Xebura Corporation
//               256 South Robertson Blvd
//               Beverly Hills, CA 90211
//               USA
//               www.xebura.com
//               hello@xebura.com
//============================================================+
// This script unsubscribes ppl....
// it needs a UI
require 'class/dbclass.php';
include_once 'include/config.php';
require 'include/ses.php';
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
$now = date('Y-m-d G:i:s', strtotime("now"));
$ip = $_SERVER['REMOTE_ADDR'];
$eid = $_REQUEST['i'];
$cid = $_REQUEST['s'];
$mid = $db->select_single_value("XEBURA_CAMPAIGN", "XE_CAMPAIGN_MID", "WHERE XE_CAMPAIGN_ID = '" . $cid . "'");
// before we try to unsub the email id, let's check if it is already unsubscribed
$sql = "SELECT * FROM XEBURA_MASTER_LIST WHERE XE_ADDRESS_ID = '" . $eid . "' AND XE_ADDRESS_OPT_STATUS = '2'";
$db->query($sql);
$result = $db->query($sql);
if ($db->getNumRows($result) > 0) {
    echo "You are already unsubscribed from this list. If you're still receiving emails from this sender, please contact our consumer relations team at abuse@xebura.com";
} else {
    // unsubscribe the email address from the master list
    $values = array(XE_ADDRESS_OPT_STATUS => '2');
    $db->update("XEBURA_MASTER_LIST", $values, "WHERE XE_ADDRESS_ID = '" . $eid . "'");
Example #5
0
include_once 'include/config.php';
require 'include/ses.php';
function encode($originalStr)
{
    $encodedStr = $originalStr;
    $num = mt_rand(1, 6);
    for ($i = 1; $i <= $num; $i++) {
        $encodedStr = base64_encode($encodedStr);
    }
    $seed_array = array('A', 'R', 'T', 'I', 'S', 'F', 'O', 'C', 'E');
    $encodedStr = $encodedStr . "+" . $seed_array[$num];
    $encodedStr = base64_encode($encodedStr);
    return $encodedStr;
}
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
// First lets check for any jobs which are a) Schedule for any time NOW or before AND b) Status is PENDING (0)
// Now we need member id of campaign...  later we'll need list id... we can probably do this as part of the same query with a join
// while we're at it, let's get the message details?
$now = date('Y-m-d G:i:s', strtotime("now"));
$sql = "SELECT \r\nXJ.XE_JOB_ID AS JID,\r\nXJ.XE_JOB_CAMPAIGN_ID AS CID,\r\nXC.XE_CAMPAIGN_MID AS MID,\r\nXC.XE_CAMPAIGN_LIST_ID AS GID,\r\nXM.XE_MSG_FROM_LABEL AS FROM_LABEL,\r\nXM.XE_MSG_FROM_EMAIL AS FROM_EMAIL,\r\nXM.XE_MSG_SUBJECT AS SUBJECT,\r\nXM.XE_MSG_REPLY_TO AS REPLYTO,\r\nXM.XE_MSG_UNSUBSCRIBE AS UNSUBSCRIBE,\r\nXM.XE_MSG_POSTAL_ADDRESS AS ADDRESS,\r\nXM.XE_MSG_TEMPLATE_TEXT AS MSG_TXT,\r\nXM.XE_MSG_TEMPLATE_HTML AS MSG_HTML\r\nFROM XEBURA_JOBS AS XJ\r\nJOIN XEBURA_CAMPAIGN AS XC ON XJ.XE_JOB_CAMPAIGN_ID = XC.XE_CAMPAIGN_ID\r\nJOIN XEBURA_MESSAGE  AS XM ON XJ.XE_JOB_CAMPAIGN_ID = XM.XE_MSG_CAMPAIGN_ID\r\nWHERE XE_JOB_LAUNCH <= '" . $now . "'\r\nAND XE_JOB_STATUS = '0'";
//job status 0 = pending
// now that we've got the campaigns, we need to loop over them..
$db->query($sql);
$result = $db->query($sql);
$total_items = $db->getNumRows($result);
if ($db->getNumRows($result) > 0) {
    while (list($jid, $cid, $mid, $gid, $from_label, $from_email, $subject, $replyto, $unsubscribe, $address, $msg_txt, $msg_html) = $db->fetchQueryRow($result)) {
        // get the amazon credentials for the campaign creator
        $res = $db->query("SELECT\r\nXE_AMZ_ACCESS_KEY AS ACCESS_KEY,\r\nXE_AMZ_SECRET_KEY AS SECRET_KEY\r\nFROM XEBURA_AMAZON_CREDENTIALS\r\nWHERE XE_AMZ_MID = '" . $mid . "'");
        $row = $db->fetchQueryArray($res);
Example #6
0
<?php

//db 객체 생성
$db = new mysqldb();
//DB연결
$db->connect();
//Defult Page = 1으로 지정
$page = 1;
//Page정보를 GET Type으로 받아옴
$page = $_GET['page'];
//입력된 Page가 0이하인 경우
if ($page <= 0) {
    $page = 1;
    $result = $db->read($page);
    while ($row_array = mysql_fetch_array($result)) {
        echo "<div class=\"viewform\"> \n       \t\t <div class=\"name\"> 작성자 : {$row_array['name']} </div>\n       \t\t <div class=\"content\"> {$row_array['content']} </div>\n       \t\t </div>";
    }
} else {
    $result = $db->read($page);
    while ($row_array = mysql_fetch_array($result)) {
        echo "<div class=\"viewform\"> \n                 <div class=\"name\"> 작성자 : {$row_array['name']} </div>\n                 <div class=\"content\"> {$row_array['content']} </div>\n                 </div>";
    }
}
//하단 Page정보 나타내기
echo "<div id=\"pageform\">";
//Page가 1일때
if ($page == 1) {
    //DB에 저장된 게시물의 Page가 1 Page밖에 없을경우
    if ($page == $db->limitpage()) {
    }
    //DB에 저장된 게시물의 Page가 1 Page가 넘어갈 경우
Example #7
0
<?php

// This is a PHP demo for collecting messaging jobs from XEBURA and sending them out via SES
require 'class/dbclass.php';
include_once 'include/config.php';
require 'include/ses.php';
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
//this should be dynamic...
$ses = new SimpleEmailService('AKIAIQQE2DZLPIWS26QQ', 'j40HKPqSSs/5HDD3gKqLovDwnxbdF0aW113pQIie');
// First lets check for any jobs which are a) Schedule for any time NOW or before AND b) Status is PENDING (0)
// Now we need member id of campaign...  later we'll need list id... we can probably do this as part of the same query with a join
// while we're at it, let's get the message details?
$now = date('Y-m-d G:i:s', strtotime("now"));
$sql = "SELECT \r\nXJ.XE_JOB_ID AS JID,\r\nXJ.XE_JOB_CAMPAIGN_ID AS CID,\r\nXC.XE_CAMPAIGN_MID AS MID,\r\nXM.XE_MSG_FROM_LABEL AS FROM_LABEL,\r\nXM.XE_MSG_FROM_EMAIL AS FROM_EMAIL,\r\nXM.XE_MSG_SUBJECT AS SUBJECT,\r\nXM.XE_MSG_REPLY_TO AS REPLYTO,\r\nXM.XE_MSG_UNSUBSCRIBE AS UNSUBSCRIBE,\r\nXM.XE_MSG_POSTAL_ADDRESS AS ADDRESS,\r\nXM.XE_MSG_TEMPLATE_TEXT AS MSG_TXT,\r\nXM.XE_MSG_TEMPLATE_HTML AS MSG_HTML\r\nFROM XEBURA_JOBS AS XJ\r\nJOIN XEBURA_CAMPAIGN AS XC ON XJ.XE_JOB_CAMPAIGN_ID = XC.XE_CAMPAIGN_ID\r\nJOIN XEBURA_MESSAGE  AS XM ON XJ.XE_JOB_CAMPAIGN_ID = XM.XE_MSG_CAMPAIGN_ID\r\nWHERE XE_JOB_LAUNCH <= '" . $now . "'\r\nAND XE_JOB_STATUS = '0'";
//job status 0 = pending
// now that we've got the campaigns, we need to loop over them.. this is our outer loop
$db->query($sql);
$result = $db->query($sql);
$total_items = $db->getNumRows($result);
if ($db->getNumRows($result) > 0) {
    while (list($jid, $cid, $mid, $from_label, $from_email, $subject, $replyto, $unsubscribe, $address, $msg_txt, $msg_html) = $db->fetchQueryRow($result)) {
        // now for our inner loop, let's find out who we're supposed to send this campaign out to, and loop over them.
        // need to add check for sending allowed status to this query later
        // remove LIMIT
        $sql = "SELECT \r\nXE_ADDRESS_ID,\r\nXE_ADDRESS_EMAIL,\r\nXE_ADDRESS_FNAME\r\nFROM XEBURA_MASTER_LIST\r\nWHERE XE_ADDRESS_MID = '" . $mid . "'\r\nLIMIT 5";
        $db->query($sql);
        $result = $db->query($sql);
        $total_items = $db->getNumRows($result);
        if ($db->getNumRows($result) > 0) {
            while (list($eid, $email, $fname) = $db->fetchQueryRow($result)) {
Example #8
0
} else {
    include_once 'include/config.php';
}
//echo 'howdy no problems';
date_default_timezone_set('America/Los_Angeles');
require_once 'language/lang.php';
require_once 'class/dbclass.php';
require_once 'class/email.class.php';
require_once 'class/onlineclass.php';
require_once 'Smarty.class.php';
require_once 'variable.php';
require_once 'imagefunction.php';
require_once 'common_functions.php';
require_once 'ses.php';
if (@(!$db)) {
    $db = new mysqldb();
}
if (@(!$onl)) {
    $onl = new onlinedb();
}
if (@(!$smarty)) {
    $smarty = new Smarty();
}
if (@(!$mailobj)) {
    $mailobj = new MyEmail();
}
require_once 'language/smarty_assign.php';
if (!isset($hide_side_menu) || $hide_side_menu == true) {
    require_once 'sidemenu_details.php';
}
require_once 'validation.php';
Example #9
0
{
    $seed_array = array('Z', 'E', 'B', 'U', 'R', 'A', 'C', 'A', 'T');
    $decoded = base64_decode($decodedStr);
    list($decoded, $letter) = split("\\+", $decoded);
    for ($i = 0; $i < count($seed_array); $i++) {
        if ($seed_array[$i] == $letter) {
            break;
        }
    }
    for ($j = 1; $j <= $i; $j++) {
        $decoded = base64_decode($decoded);
    }
    return $decoded;
}
$fname = "";
$db = new mysqldb();
$cid = decode($_REQUEST['c']);
$html = $db->select_single_value("XEBURA_MESSAGE", "XE_MSG_TEMPLATE_HTML", "WHERE XE_MSG_CAMPAIGN_ID='" . $cid . "'");
$final_html = str_replace('{FNAME}', $fname, $html);
$title = $db->select_single_value("XEBURA_MESSAGE", "XE_MSG_SUBJECT", "WHERE XE_MSG_CAMPAIGN_ID='" . $cid . "'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo $title;
?>
</title>
</head>
<body>
Example #10
0
 function del($k)
 {
     return $this->db->query("DELETE from `{$this->table}` where k=?", $k);
     // should return 1 or 0
 }
Example #11
0
<?php

$_config['database']['hostname'] = "imattioapp.com";
$_config['database']['username'] = "******";
$_config['database']['password'] = "******";
$_config['database']['database'] = "imattioa_taxi";
/*$_config['database']['hostname'] = "localhost";
	$_config['database']['username'] = "******";
	$_config['database']['password'] = "******";
	$_config['database']['database'] = "imattio_taxi";*/
//connect the database server
$link = new mysqldb();
$link->connect($_config['database']);
$link->selectdb($_config['database']['database']);
$link->query("SET NAMES 'utf8'");
 /**
  * 执行SQL脚本文件
  *
  * @param array $filelist
  * @return string
  */
 private function restore($file, $db_config)
 {
     set_time_limit(0);
     $host = $db_config['DB_HOST'];
     if (!empty($db_config['DB_PORT'])) {
         $host = $db_config['DB_HOST'] . ':' . $db_config['DB_PORT'];
     }
     Vendor("mysql");
     $db = new mysqldb(array('dbhost' => $host, 'dbuser' => $db_config['DB_USER'], 'dbpwd' => $db_config['DB_PWD'], 'dbname' => $db_config['DB_NAME'], 'dbcharset' => 'utf8', 'pconnect' => 0));
     $sql = file_get_contents($file);
     $sql = $this->remove_comment($sql);
     $sql = trim($sql);
     $bln = true;
     $tables = array();
     $sql = str_replace("\r", '', $sql);
     $segmentSql = explode(";\n", $sql);
     $table = "";
     foreach ($segmentSql as $k => $itemSql) {
         $itemSql = trim(str_replace("%DB_PREFIX%", $db_config['DB_PREFIX'], $itemSql));
         if (strtoupper(substr($itemSql, 0, 12)) == 'CREATE TABLE') {
             $table = preg_replace("/CREATE TABLE (?:IF NOT EXISTS |)(?:`|)([a-z0-9_]+)(?:`|).*/is", "\\1", $itemSql);
             if (!in_array($table, $tables)) {
                 $tables[] = $table;
             }
             if ($db->query($itemSql) === false) {
                 $bln = false;
                 showjsmessage("建立数据表 " . $table . " ... 失败", 1);
                 break;
             } else {
                 showjsmessage("建立数据表 " . $table . " ... 成功");
             }
         } else {
             if ($db->query($itemSql) === false) {
                 $bln = false;
                 showjsmessage("添加数据表 " . $table . " ... 数据失败", 1);
                 break;
             }
         }
     }
     return $bln;
 }
Example #13
0
//
// Author: Xebura Corporation
//
// (c) Copyright:
//               Xebura Corporation
//               256 South Robertson Blvd
//               Beverly Hills, CA 90211
//               USA
//               www.xebura.com
//               hello@xebura.com
//============================================================+
// this script tracks link clicks and redirects the user to the link
require 'class/dbclass.php';
include_once 'include/config.php';
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
$now = date('Y-m-d G:i:s', strtotime("now"));
$ip = $_SERVER['REMOTE_ADDR'];
$eid = $_REQUEST['i'];
$lid = $_REQUEST['l'];
$sql = "SELECT XE_LINK_CAMPAIGN_ID, XE_LINK_MID, XE_LINK_URL FROM XEBURA_LINK WHERE XE_LINK_ID = '" . $lid . "'";
$result = $db->query($sql);
if ($db->getNumRows($result) > 0) {
    while (list($cid, $mid, $url, $amount) = $db->fetchQueryRow($result)) {
        // count every click
        // log the event to the statistics table
        $values = array(XE_STAT_CAMPAIGN_ID => $cid, XE_STAT_MID => $mid, XE_STAT_EMAIL_ID => $eid, XE_STAT_LINK_ID => $lid, XE_STAT_TYPE => '2', XE_STAT_IP => $ip, XE_STAT_TIMESTAMP => $now);
        $stat = $db->insert("XEBURA_STATISTICS", $values);
        //echo 'update - open';
        header("Location:" . $url);
        exit;
Example #14
0
<?php

require "class.mysql.php";
$mysql = new mysqldb();
$is_connected = false;
if ($mysql->connect("root", "", "localhost", "epispider")) {
    $is_connected = true;
} else {
    if ($mysql->connect("epispider", "epispider", "db.berlios.de", "epispider")) {
        $is_connected = true;
    } else {
        header("location: error.html");
    }
}
$sql = "select w.week, w.country_id, w.archive_num, r.email_subject, r.email_url from weeklydata w, raw r where r.archive_num = w.archive_num and w.country_id = '" . $_GET["country_id"] . "' and w.week = '" . $_GET["week"] . "'";
if ($result = mysql_query($sql) or die(mysql_error())) {
    if (mysql_num_rows($result)) {
        $message = "Clicking on the links will bring you to the article on the ProMED web site.<br>";
        $firstpass = false;
        while (list($week, $country, $archive, $subject, $url) = mysql_fetch_array($result)) {
            if (!isset($display)) {
                $display = "WEEK {$week} REPORTS<br><br>{$message}";
            }
            $display .= "<a href='{$url}' target='_blank'>{$subject}</a><br>";
        }
        print $display;
    }
}
Example #15
0
} else {
    include_once 'include/config.php';
}
//echo 'howdy no problems';
date_default_timezone_set('America/Los_Angeles');
require_once 'language/lang.php';
require_once 'class/dbclass.php';
require_once 'class/email.class.php';
require_once 'class/onlineclass.php';
require_once 'Smarty.class.php';
require_once 'variable.php';
require_once 'imagefunction.php';
require_once 'common_functions.php';
require_once 'ses.php';
if (@(!$db)) {
    $db = new mysqldb();
}
if (@(!$onl)) {
    $onl = new onlinedb();
}
if (@(!$smarty)) {
    $smarty = new Smarty();
}
if (@(!$mailobj)) {
    $mailobj = new MyEmail();
}
require_once 'language/smarty_assign.php';
if (!isset($hide_side_menu) || $hide_side_menu == true) {
    require_once 'sidemenu_details.php';
}
require_once 'validation.php';
Example #16
0
 function process_auth ($login, $password) {
     if (mysqldb::mysql_version()>4.0) {
         $sql = "select user_id, user_firstname, user_lastname, user_login, user_password, user_dob, user_gender, user_lang, user_admin, user_role ".
                "from game_user where user_login = '******' and user_password = old_password('$password') and user_active = 'Y'";
     } else {
         $sql = "select user_id, user_firstname, user_lastname, user_login, user_password, user_dob, user_gender, user_lang, user_admin, user_role ".
                "from game_user where user_login = '******' and user_password = password('$password') and user_active = 'Y'";
     }
     if ($result = mysql_query($sql)) {
         if (mysql_num_rows($result)) {
             $user_array = mysql_fetch_array($result);
         }
     }
     return $user_array;
 }
 public function import_user()
 {
     //导入前,检查会员名,是否有重复的,有重复的不能执行导入
     ini_set("memory_limit", "100M");
     $cfg = unserialize(fanweC('INTEGRATE_CONFIG'));
     // INTEGRATE_CONFIG $_SESSION['cfg'];
     //echo VENDOR_PATH."mysql.php"; exit;
     //include_once(VENDOR_PATH."mysql.php");
     /*
     	    //include_once(__ROOT__."/app/source/class/mysql_db.php");
     	    include_once(FANWE_ROOT."/core/class/db.class.php");
     	    include_once(FANWE_ROOT."/core/class/mysql.class.php");
     	    $db_cfg = array(
     	    'DB_HOST'=>$cfg['db_host'],
     	    'DB_NAME'=>$cfg['db_name'],
     	    'DB_USER'=>$cfg['db_user'],
     	    'DB_PWD'=>$cfg['db_pass'],
     	    'DB_PORT'=>3306,
     	    'DB_PREFIX'=>$cfg['db_pre'],
     	    );
     	    $class = 'FDbMySql';	     
     	    $ucdb = &FDB::object($class);
     	    $ucdb->setConfig($db_cfg);
     	    $ucdb->connect();
     */
     $db_cfg = array('dbhost' => $cfg['db_host'], 'dbname' => $cfg['db_name'], 'dbuser' => $cfg['db_user'], 'dbpwd' => $cfg['db_pass'], 'dbcharset' => $cfg['db_charset'], 'pconnect' => '');
     Vendor('mysql');
     $ucdb = new mysqldb($db_cfg);
     //dump($ucdb); exit;
     Log::record("==================uc会员整合 begin======================");
     $item_list = M()->query("SELECT uid as id,user_name,password as user_pwd, ucenter_id, email, '' as last_ip,reg_time as create_time FROM " . C("DB_PREFIX") . "user ORDER BY `id` ASC");
     foreach ($item_list as $data) {
         $salt = rand(100000, 999999);
         $password = md5($data['user_pwd'] . $salt);
         //uc口令方式:md5(md5(明文)+随机值)
         if (strtolower($cfg['db_charset']) == 'gbk') {
             $data['username'] = addslashes(utf8ToGB($data['user_name']));
         } else {
             $data['username'] = addslashes($data['user_name']);
         }
         $uc_userinfo = $ucdb->fetchFirst("SELECT `uid`, `password`, `salt` FROM " . $cfg['db_pre'] . "members WHERE `username`='{$data['username']}'");
         //dump($uc_userinfo);
         if (!$uc_userinfo) {
             $ucdb->query("INSERT INTO " . $cfg['db_pre'] . "members SET username='******'username']}', password='******', email='{$data['email']}', regip='{$data['last_ip']}', regdate='{$data['create_time']}', salt='{$salt}'", 'SILENT');
             $lastuid = $ucdb->insertId();
             $ucdb->query("INSERT INTO " . $cfg['db_pre'] . "memberfields SET uid='{$lastuid}'", 'SILENT');
             M()->query("UPDATE " . C("DB_PREFIX") . "user SET `ucenter_id`='" . $lastuid . "' WHERE `uid`='" . $data['id'] . "'");
             //Log::record("INSERT INTO ".$cfg['db_pre']."members SET username='******', password='******', email='$data[email]', regip='$data[last_ip]', regdate='$data[create_time]', salt='$salt'");
             //Log::record("INSERT INTO ".$cfg['db_pre']."memberfields SET uid='$lastuid'");
             //M()->query("UPDATE " . C("DB_PREFIX") . "user SET `id`= $lastuid "." where id = ".$data['id']);
         } else {
             M()->query("UPDATE " . C("DB_PREFIX") . "user SET `ucenter_id`='" . $uc_userinfo['uid'] . "' WHERE `uid`='" . $data['id'] . "'");
             /*
             if ($merge_method == 1)//1:将与UC用户名和密码相同的用户强制为同一用户
             {
                 if (md5($data['user_pwd'].$uc_userinfo['salt']) == $uc_userinfo['password'])
                 {
                     //$merge_uid[] = $data['id'];
                     $uc_uid[] = array('user_id' => $data['id'],   	//旧会员ID
                     				  'uid' => $uc_userinfo['uid']	//新会员ID
                     				  );
                     continue;
                 }
             }
             */
             $ucdb->query("REPLACE INTO " . $cfg['db_pre'] . "mergemembers SET appid='" . UC_APPID . "', username='******'username']}'", 'SILENT');
             //Log::record("REPLACE INTO ".$cfg['db_pre']."mergemembers SET appid='".UC_APPID."', username='******'");
         }
     }
     //M()->query("UPDATE " . C("DB_PREFIX") . "user SET `ucenter_id`= ucenter_id_tmp");
     //Log::record("==================uc会员整合 end======================");
     //Log::save();
     clearCache();
     $this->assign('jumpUrl', u('Integrate/index'));
     $this->success('成功将会员数据导入到 UCenter');
 }
Example #18
0
 function logindata()
 {
     global $prefix, $user_prefix;
     $user = $this->getcookiedetail();
     //echo "Data: $user<BR>\n";
     //if(!is_array($user))
     //{
     $usertmp = base64_decode($user);
     $user = explode(":", $usertmp);
     $uid = "{$user['0']}";
     $pwd = "{$user['2']}";
     //echo "UID: $uid<BR>PWD: $pwd<BR><BR>\n";
     /*}
     		else
     		{
     			$uid = "$user[0]";
     			$pwd = "$user[2]";
     		}*/
     if ($uid != "" and $pwd != "") {
         $result = "select uid, name, pass, uname, email, esc_level_1, esc_level_2, esc_admin from nuke_users where uid='{$uid}' AND pass='******'";
         $TRUE = true;
         $FALSE = false;
         // echo "Opening DB connection<BR>\n";
         $thisData = new mysqldb("localhost", "nuke_aq", "dba", "sql99");
         $thisData->setsql($result);
         if (!$thisData->selectquery()) {
             echo "ERROR: " . mysql_error() . "<BR>\n";
             die("MEGA error!");
         }
         if ($thisData->numberrows == 0) {
             echo "NO RECORDS FOUND!<BR>\n";
         } else {
             for ($i = 0; $i <= $thisData->numberrows; $i++) {
                 //echo "<PRE>"; print_r($thisData->result[$i]); echo "</PRE>\n";
                 $this->uid = $thisData->result[0]['uid'];
                 $this->uname = $thisData->result[0]['name'];
                 $this->lname = $thisData->result[0]['uname'];
                 $this->email = $thisData->result[0]['email'];
                 $this->l1 = $thisData->result[0]['esc_level_1'];
                 $this->l2 = $thisData->result[0]['esc_level_2'];
                 $this->admin = $thisData->result[0]['esc_admin'];
             }
         }
     } else {
         debug("Sad thing, this!");
     }
 }
Example #19
0
<?php

include "../db/mysqldb.php";
$db = new mysqldb();
$db->connect();
$db->write();
echo "<script>location.href='../../board.php'</script>";
Example #20
0
// (c) Copyright:
//               Xebura Corporation
//               256 South Robertson Blvd
//               Beverly Hills, CA 90211
//               USA
//               www.xebura.com
//               hello@xebura.com
//============================================================+
/* If the session exists for a user and it accidently comes to the index page
then first it unsets the message on session. */
if (isset($_SESSION['SHOWMESSAGE'])) {
    unset($_SESSION['SHOWMESSAGE']);
}
include "include/unsecure_includes.php";
if (isset($_REQUEST['username']) && trim($_REQUEST['username']) != "") {
    $db = new mysqldb();
    $sql = "select  * from  xebura_MEMBERS where USERNAME='******'username']) . "' and PASSWORD='******'password'])) . "' AND ACCOUNT_STATUS ='1'";
    $result = $db->query($sql);
    $num = $db->getNumRows($result);
    if ($num > 0) {
        $row = $db->fetchQueryArray($result);
        $aid = $row["AID"];
        $mid = $row["MID"];
        /*include "online.php";
        		$row=$db->fetchQueryArray($result);
        		$aid=$row["AID"]; echo $aid;
        		$mid=$row["MID"];echo $mid;
        		//exit;
        		if($_POST['username']!="")
        		{
        		$users_online_read = fopen("$log_file", "r");
Example #21
0
//
// Author: Xebura Corporation
//
// (c) Copyright:
//               Xebura Corporation
//               256 South Robertson Blvd
//               Beverly Hills, CA 90211
//               USA
//               www.xebura.com
//               hello@xebura.com
//============================================================+
require 'class/dbclass.php';
include_once 'include/config.php';
require_once "bounce_driver.class.php";
date_default_timezone_set('America/Los_Angeles');
$db = new mysqldb();
$now = date('Y-m-d G:i:s', strtotime("now"));
$ip = $_SERVER['REMOTE_ADDR'];
$bouncehandler = new Bouncehandler();
// read the bounced email
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
    $email .= fread($fd, 1024);
}
fclose($fd);
// the bounced message is the email we piped in
$bounce = $email;
//$bounce = file_get_contents("eml/1.eml");
// for testing purposes we'll use a static email file