"1 MONTH", 51 => "1 MONTH", 52 => "1 YEAR", 53 => "1 YEAR" ); /* Heyspread info */ $HEYSPREAD_API_KEY = "1dfab5130a4a992d63de20beccba4cb3"; $HEYSPREAD_URL = "http://heyspread.com/api2"; // Stripe Detail Start $StripeDetail = array(); $StripeDetail['live']['secret'] = 'sk_live_GHXrnvFXI6SOePjgAwUI8WKr'; $StripeDetail['live']['publishable'] = 'pk_live_w8LvS6b4Xo1rfzvHRZhVkl6k'; $StripeDetail['test']['secret'] = 'sk_test_sJsy3L8ODRT1eDYL8HCJi5ZM'; $StripeDetail['test']['publishable'] = 'pk_test_yQxG17G2oRld8kHAfIQLcqdO'; // change Flag to "live" from Live Detail as Well "test" for Test Credentials if( isset($_GET['artoon']) ) { $Stripe_Mode = 'test'; } else { $Stripe_Mode = 'live'; } $StripeSecret = $StripeDetail[$Stripe_Mode]['secret']; $StripePublishable = $StripeDetail[$Stripe_Mode]['publishable']; // Stripe Detail End /** OLD INFO $BEANSTREAM_MERCHANT_ID = "257140000"; //256190000 - test account $HASH_VALUE = "easyartoon"; //as in administration => account settings => order settings $BEANSTREAM_USERNAME = "easyartoon123"; //as in administration => account settings => order settings $BEANSTREAM_PASSWORD = "easypass123"; //as in administration => account settings => order settings $PASS_CODE = "bb52a21914E84AF49aBE2f9af2Ed1734"; //as in administration => account settings => order settings */ /* Beanstream info */ /* New Beanstream account (the 3rd one) */ $BEANSTREAM_MERCHANT_ID = "343580102"; //256190000 - test account $HASH_VALUE = "easyartoon"; //as in administration => account settings => order settings $BEANSTREAM_USERNAME = "easyartoon123"; //as in administration => account settings => order settings $BEANSTREAM_PASSWORD = "easypass123"; //as in administration => account settings => order settings $PASS_CODE = "E3fB4193f2b64203B2d4A8edFB98C626"; //as in administration => account settings => order settings. //$BEANSTREAM_MERCHANT_ID = "160270000"; //256190000 - test account /*$BEANSTREAM_MERCHANT_ID = "257140000"; //256190000 - test account $HASH_VALUE = "easyartoon"; //as in administration => account settings => order settings $BEANSTREAM_USERNAME = "easyartoon123"; //as in administration => account settings => order settings $BEANSTREAM_PASSWORD = "easypass123"; //as in administration => account settings => order settings $PASS_CODE = "bb52a21914E84AF49aBE2f9af2Ed1734"; //as in administration => account settings => order settings. */ /** Beanstream testing account */ /*$BEANSTREAM_MERCHANT_ID = "300201542"; //256190000 - test account $HASH_VALUE = "easytestartoon"; //as in administration => account settings => order settings $BEANSTREAM_USERNAME = "sudhir1#"; //as in administration => account settings => order settings $BEANSTREAM_PASSWORD = "sudhir1#23"; //as in administration => account settings => order settings $PASS_CODE = "C46B7d20254e4ac49646CE9e2Db96812"; //as in administration => account settings => order settings*/ /** Beanstream testing account */ /* AWEBER APPLICATION INFO START */ $AWEBER_CONSUMER_KEY = 'AkH1IxgeQ0N7VJ5Mds11s2fx'; //application setting $AWEBER_CONSUMER_SECRET = 'jtsvE1fTREUiYG5o6uQTPIkgSaomoE5UW3dxsxc3'; //application setting $AWEBER_ACCESS_KEY = 'AgwgABka2dYc6kYQOi1wnpfM'; //user access token $AWEBER_ACCESS_SECRET = '2NvmPnLyy1DuIXSphq2bqE9zYYfb5KecOJzOf0dm'; //user access token $AWEBER_ACCOUNT_ID = '227766'; //user account ID $ewvfreeiscool_listID = "3149162"; //listid of aweber $ewvprorocks_listID = "3149146"; //listid of aweber $ewvprovideo_listID = "3150989"; //listid of aweber /* AWEBER APPLICATION INFO END */ /* FACEBOOK APPLICATION INFO */ $FB_APP_ID = '453520384768225'; $FB_APP_SECRET = 'd535ccd358053f7f49def6f27820deb1'; /* google application key */ $OAUTH2_CLIENT_ID = '533970501576-r4uksqqhcnighqu5i82tsu4vm7n78vu0.apps.googleusercontent.com'; $OAUTH2_CLIENT_SECRET = 'p8AKf6xekaKIBoedyzHjNAgz'; $OAUTH2_CLIENT_ID = '537313759334-ok25eob2q821r4d8pahqrhduv884bpdf.apps.googleusercontent.com'; $OAUTH2_CLIENT_SECRET = 'CYtPy-TwCOoZqcYzxu8m4XqL'; /** EBAY APPLICATION KEYS */ $sandbox = (@$_SERVER['HTTP_HOST'] == '192.168.0.78') ? TRUE : FALSE; if($sandbox){ $EBAY_DEVID = 'cb6198ac-2c8f-4cf3-986d-3b633956d42c'; $EBAY_APPID = 'EasyWebV-d5f6-4e72-99c2-70c568811e24'; $EBAY_CERTID = '48945067-58bf-408f-b0e3-305885110108'; $EBAY_MODE = $sandbox; //if sandvox than true else false $EBAY_VERSION = '879'; $EBAY_RUNAME = 'Easy_Web_Video_-EasyWebV-d5f6-4-sextyx'; $EBAY_AUTHURL = 'https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&'; $EBAY_URL = 'http://cgi.sandbox.ebay.com/'; } else{ $EBAY_DEVID = 'cb6198ac-2c8f-4cf3-986d-3b633956d42c'; $EBAY_APPID = 'EasyWebV-7e4d-4d07-acb2-c1d26f440354'; $EBAY_CERTID = '3a83deac-85db-4ef8-9789-4d86fe1a9706'; $EBAY_MODE = $sandbox; //if sandvox than true else false $EBAY_VERSION = '879'; $EBAY_RUNAME = 'Easy_Web_Video_-EasyWebV-7e4d-4-scqxjomxk'; $EBAY_AUTHURL = 'https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&'; $EBAY_URL = 'http://cgi.ebay.com/'; } /** PAYPAL MODE */ $sandbox = FALSE; $paypalURL = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; if(!$sandbox){ $paypalURL = 'https://www.paypal.com/cgi-bin/webscr'; } /** PAYPAL MODE */ $VERSION = "v=1.3"; $ADMIN_EMAIL = "topnetsolutions@gmail.com"; //user information will be sent on this email $CONTACT_URL = "http://support.easywebvideo.com"; #"http://www.easywebvideo.com/helpdesk/"; error_reporting(E_ERROR); if (@$_SERVER['HTTP_HOST'] == '192.168.0.112' || @$_SERVER['HTTP_HOST'] == '192.168.0.78') { //Localhost info $DB_SERVER = 'localhost'; $DB_LOGIN = "root"; $DB_PASSWORD = ""; $DB_NAME = "easywebvideo"; $SITE = 'http://'.@$_SERVER['HTTP_HOST']."/ewv_svn/"; $SITE_HTTPS = 'http://'.@$_SERVER['HTTP_HOST']."/ewv_svn/"; $SITE_DIR = "D:/wamp/www/ewv_svn/"; $USERS_DIR = $SITE_DIR . "files/"; $BEANSTREAM_MERCHANT_ID = "256190000"; $FB_APP_ID = '519446178144875'; $FB_APP_SECRET = 'e62770dce87b27cade8be5132d1a2cd8'; } //default rtmp url for s3 $RTMP_URL = 'rtmp://sp5besp3p52hd.cloudfront.net:1935/cfx/st/||rtmp://sp5besp3p52hd.cloudfront.net:80/cfx/st/'; require_once("functions.php"); ?> $value) { if ($key == "id" && $value == 0) continue; $fields [] = $key; $values [] = Sql($value); } $sql = "INSERT INTO " . $tablename . " (" . implode(",", $fields) . ") VALUES (" . implode(",", $values) . ")"; $ret = mysql_query($sql); if ($ret) $obj->id = mysql_insert_id(); return $ret; } function ObjectSqlUpdate($obj, $tablename = "") { if ($tablename == "") $tablename = strtolower(get_class($obj)) . "s"; $fields = array(); foreach ($obj as $key => $value) { if ($key == "id") continue; $fields [] = $key . "=" . Sql($value); } $sql = "UPDATE " . $tablename . " SET " . implode(",", $fields) . " WHERE id=" . $obj->id; $ret = mysql_query($sql); return $ret; } function ObjectSqlUpdate1($obj, $tablename = "", $primary_col = "id") { if ($tablename == "") $tablename = strtolower(get_class($obj)) . "s"; $fields = array(); foreach ($obj as $key => $value) { if ($key == $primary_col) continue; $fields [] = $key . "=" . Sql($value); } $sql = "UPDATE " . $tablename . " SET " . implode(",", $fields) . " WHERE " . $primary_col . "=" . $obj->$primary_col; $ret = mysql_query($sql); return $ret; } function ObjectSqlSave($obj, $tablename = "") { if ($obj->id == 0) return ObjectSqlInsert($obj, $tablename); else return ObjectSqlUpdate($obj, $tablename); } function ObjectFromArray($obj, $row) { foreach ($obj as $key => $value) if (isset($row[$key])) { if (is_bool($obj->$key)) $obj->$key = $row[$key] == "1"; else if (is_array($obj->$key) && is_string($row[$key])) $obj->$key = json_decode($row[$key], TRUE); else if (is_string($obj->$key) && is_array($row[$key])) $obj->$key = implode(",", $row[$key]); else if (is_string($obj->$key) && is_string($row[$key])) $obj->$key = stripslashes($row[$key]); else $obj->$key = $row[$key]; } } function ObjectSqlLoad($obj, $tablename = "") { if ($tablename == "") $tablename = strtolower(get_class($obj)) . "s"; if ($obj->id == 0) return; $res = mysql_query("SELECT * FROM " . $tablename . " WHERE id=" . $obj->id); if ($res != FALSE && mysql_num_rows($res) == 1) { $row = mysql_fetch_assoc($res); ObjectFromArray($obj, $row); mysql_free_result($res); return TRUE; } else return FALSE; } function ObjectsSqlLoad($sql, $classname) { $res = mysql_query($sql); if ($res != FALSE && mysql_num_rows($res) > 0) { $ret = array(); while ($row = mysql_fetch_assoc($res)) { $obj = new $classname(); ObjectFromArray($obj, $row); $ret [] = $obj; } return $ret; } else return FALSE; } function ObjectSqlDelete($obj, $tablename = "") { if ($tablename == "") $tablename = strtolower(get_class($obj)) . "s"; if ($obj->id == 0) return; $res = mysql_query("DELETE FROM " . $tablename . " WHERE id=" . $obj->id); return $res; } function DbQuery($sql, $pk = "") { $res = mysql_query($sql); //for INSERT, UPDATE, DELETE mysql_query returns TRUE or FALSE if ($res === TRUE || $res === FALSE) return $res; //handle if ($res) { //single value query if (mysql_num_fields($res) == 1 && mysql_num_rows($res) == 1) return mysql_result($res, 0); //empty result if (mysql_num_rows($res) == 0) return FALSE; $ret = array(); while ($row = mysql_fetch_assoc($res)) if (is_array($row) && count($row) > 0) { if ($pk == "") $ret [] = $row; else $ret[$row[$pk]] = $row; } mysql_free_result($res); return $ret; } return FALSE; } function LastDbError() { return mysql_error(); } function DeleteDir($dir) { $files = glob($dir . '*', GLOB_MARK); foreach ($files as $file) { if (is_dir($file)) DeleteDir($file); else unlink($file); } @rmdir($dir); } function DbConnect() { global $DB_SERVER, $DB_LOGIN, $DB_PASSWORD, $DB_NAME, $db_link; if (!$db_link) { $db_link = mysql_connect($DB_SERVER, $DB_LOGIN, $DB_PASSWORD) or die(mysql_error()); mysql_select_db($DB_NAME, $db_link) or die(mysql_error()); } } function DbClose() { global $db_link; mysql_close($db_link); $db_link = NULL; } function AnalyticsTableUnion($select = '*', $video_id = 0, $table_name = 'stat_video_', $where = '', $start = '', $end = '') { if ($start == '') $start = strtotime('Jun2012'); else $start = strtotime(date('MY', strtotime($start))); if ($end == '') $end = strtotime(date('MY')); else $end = strtotime(date('MY', strtotime($end))); $time = $start; $tbFromat = date('MY', $time); $query = "select $select from "; if (IsTableExist($table_name . $tbFromat)) $sql = "((select * from " . $table_name . $tbFromat . " where video_id=$video_id)"; while ($end >= $time) { $time = strtotime('+1 month', $time); $tbFromat = date('MY', $time); if (IsTableExist($table_name . $tbFromat)) { if ($sql != "") $sql .= " UNION (select * from " . $table_name . $tbFromat . " where video_id=$video_id) "; else $sql = "((select * from " . $table_name . $tbFromat . " where video_id=$video_id) "; } } $query .= $sql . ')as t1 ' . $where; return $query; } function IsTableExist($table_name) { if ($table_name != '') { $db = mysql_query("select * from $table_name limit 1"); if ($db) return true; else return false; } else return false; } function getValueByTagName( $data, $s_tag, $e_tag) { $pos = strpos($data, $s_tag); if ($pos === false) { return ''; } else { $s = strpos( $data,$s_tag) + strlen( $s_tag); $e = strlen( $data); $data= substr($data, $s, $e); $s = 0; $e = strpos( $data,$e_tag); $data= substr($data, $s, $e); $data= substr($data, $s, $e); return $data; } } function getIpAddress() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet $ip = $_SERVER['HTTP_CLIENT_IP']; elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; else $ip = $_SERVER['REMOTE_ADDR']; return $ip; } function saveUserAction($action = "", $userID = "", $ipAddress = ""){ $sql = "INSERT INTO `user_login_track` (`action`, `userid`, `ip_address`) VALUES ('".$action."', '".$userID."', '".$ipAddress."')"; mysql_query($sql); } DbConnect(); ?>