function tsan_connect() { global $analytics_username; global $analytics_password; global $analytics_DBName; $connection = mysql_connect("topperstudioscom.ipagemysql.com", $analytics_username, $analytics_password) or kill_script('1'); mysql_select_db($analytics_DBName, $connection) or kill_script('2'); return $connection; }
function tsan_connect() { $analytics_DBName = 'tsanalyticsdb'; $analytics_tableName = 'ts_analytics_data_01'; $analytics_username = '******'; $analytics_password = "******"; $analyticsPrefixString = 'ts_an_'; $connection = mysql_connect("topperstudioscom.ipagemysql.com", $analytics_username, $analytics_password) or kill_script('1'); mysql_select_db($analytics_DBName, $connection) or kill_script('2'); return $connection; }
$query = "select login from users_users where lower(login) = 'admin' and (hash='{$hash}' or hash='{$hash2}' or hash='{$hash3}')"; $result = $dbTiki->Execute($query); if ($result->numRows()) { $logged = 'y'; $_SESSION["install-logged-{$multi}"] = 'y'; return array('num' => 0, 'mes' => "admin logged in."); } else { return array('num' => 1, 'mes' => "Incorrect password"); } } } // ------------------------------------------------------------------------------------- // end of functions .. now starts the processing // After install. This should remove this script. if (isset($_REQUEST['kill'])) { kill_script(); die; } if (is_file('db/virtuals.inc')) { $virtuals = array_map('trim', file('db/virtuals.inc')); foreach ($virtuals as $v) { if ($v) { if (is_file("db/{$v}/local.php") and is_readable("db/{$v}/local.php")) { $virt[$v] = 'y'; } else { $virt[$v] = 'n'; } } } } else { $virt = false;
function setSQLValues($valueArray, $whereSelector) { global $analytics_username; global $analytics_password; global $analytics_DBName; global $analytics_tableName; $valueStr = ""; foreach ($valueArray as $key => $value) { $valueStr .= "" . $key . '="' . $value . '",'; } $valueStr = removeLastChar($valueStr); $query = 'UPDATE ' . $analytics_tableName . ' SET ' . $valueStr . " WHERE " . $whereSelector; debugLog("SQL: Setting values with query: " . $query); $connection = tsan_connect(); mysql_query($query, $connection) or kill_script('3.3'); mysql_close($connection); }