Location: PHPKode > projects > KSMS bulk sms manager > ksms-e1.2.35/config.inc.php
<?php

// -------------------------------------------------------------------------//
// KSMS ^ Short Message System Manager										//
// -------------------------------------------------------------------------//
// Based on "DBSMS" (C) 2002 Paolo Remonato									//
// Copyright (C) 2002-2006 Paolo Remonato									//
// KSMS-PROJECT HOME  :  http://ksms.sourceforge.net/						//
// -------------------------------------------------------------------------//
//   Please,do not delete these lines	^^^									//
// -------------------------------------------------------------------------//
/*
  This program is free software; you can redistribute it and/or modify it under the terms
  of the GNU General Public License as published by the Free Software Foundation.
  The software is provided "as is" without any express or implied warranty of any kind,
  Including warranties of noninfringement, merchantability, or fitness for a particular purpose.  
*/
###		@version 	: 2006-02-20,v1.2.35	kingmo
###		@last upd 	: 
###		@filename 	: config.inc.php


/* ************************************************ */
/*     COMMON CONFIGURATION 						*/
/* ************************************************ */

 // If you set to yes this, you see some data at the top of every page and 
 // some mysql-errors may display at the public!
 // Set to YES only for debug or testing. Set to NO whe you are in working side"
define("QUERY_DEBUG", "on");

/* **************************************************************************************** */
/* 				BASE CONFIGURATION															*/
/* **************************************************************************************** */
// List of authorized domain to use this program (NO http://)
	$domauth1 = 'www.viabazar.net';
	$domauth2 = '10.0.0.50';
	$domauth3 = 'sms.example.com';
// List of authorized IP to use this program (NO http://)
	$authorizedIP1 = '151.38.150.243';
	$authorizedIP2 = '10.0.0.50';
	$authorizedIP3 = '85.94.195.1';

// error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
error_reporting(E_ALL);
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

// Ksms version string.
/// look at file: vers.inc.php
///  $cfg["version"] = "xxxxx";
require("vers.inc.php");
$cfg["signature"] = "Ksms - Assiplan sms system " . $cfg["version"];
$cfg["sysver"] = "KSMS " . $cfg["version"];

// Database connection parameters.
$cfg["db_type"] = "mysql";      		// DB server type eg: mysql, postgres, sqlite, odbc. See ADODB docs.
$cfg["db_host"] = "localhost";  		// DB server hostname. DSN if odbc OR /path/filename if sqlite.
$cfg["db"] = "KSMSenDB";           		// Ksms database. Not used if odbc or sqlite.
$cfg["auid"] = "ksmsusr";       		// DB server user id.
$cfg["apasswd"] = "pgp0025tx01qetwys";	// DB server password.
$cfg["db_persist"] = FALSE;     		// Use persistent database connection. TRUE or FALSE.
$cfg["sespath"] = "/tmp/Session_tmp/";	// Full Path. Directory for sessions file (chmod 0777)
// For debuggin (view) in "connection.inc.php". TRUE or FALSE.
if (QUERY_DEBUG == 'on') {
$cfg["admview_debug"] = TRUE;
 } else {
$cfg["admview_debug"] = FALSE;
}

// Miscellaneous configuration parameters.
$cfg["curr"] = "€  ";        // Local currency symbol. eg: $, £, € etc. (FUTURE)

/////////////////////////////////////////////////////////////////////////
// the paths and other configuration in local (not in database!)       //
/////////////////////////////////////////////////////////////////////////

// "unix" or "win"
$cfg["os"] = "unix";

// Full path to ksms directory.
$cfg["basedir"] = "public_homedir/USER/...public//ksms-e1.2.35";

// Full path to files with data of sended messages...NO TRAILING SLASH!... chmod666.........
$cfg["sendeddir"] = "public_homedir/USER/.../sms_sended";

// Full path to where is the gateway's file ...NO TRAILING SLASH!... chmod666 or 777.........
$cfg["gatewdir"] = "public_homedir/USER/.../sms_sended/gateways";

// Full path to where is the MASTER or ORIGINAL gateway's file ...NO TRAILING SLASH!... chmod666
$cfg["mastergwd"] = "public_homedir/USER/.../sms_sended/gateways/MasterGatewayFiles";

/* ********************************************************************************* */
/* CHECK IF THE HOST IS AN ABLE HOSTER !											 */
/* ********************************************************************************* */
$SERVERIP = $_SERVER['SERVER_ADDR'];
$SERVERNAME = $_SERVER['SERVER_NAME'];
$HEADHOST = $_SERVER['REMOTE_ADDR'];
if (QUERY_DEBUG == 'on')
{
	// Only for test purpose, leave uncommented the following four lines!!!
		echo "<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='2' color='#ff9900'>";
		echo "SERVER NAME = ".$SERVERNAME."&nbsp;|&nbsp;";
		echo "Domain Auth = ".$domauth2."&nbsp;|||&nbsp;";
		echo "SERVER IP = ".$SERVERIP."&nbsp;|&nbsp;";
		echo "Authorized IP = ".$authorizedIP2."!";
		echo "</font><br />";
}

// TO DO : CHANGE THESE ROUTINES!
if ($SERVERIP != $authorizedIP1) { $aa = 1; }
if ($SERVERIP != $authorizedIP2) { $aa = 2; }
if ($SERVERIP != $authorizedIP3) { $aa = 3; }
//	echo "<br />:::: ".$aa." ::::<br />";
if (($aa < 1) || ($aa > 3))
	{
		// STOP. IS NOT AUTHORIZED!
		// future language implementation!
		//echo $lang['keyerrors1']."<br />";
		//include $errorfootpage;
	echo("<b>Page not found.Please Try Again.</b> <br><b>Pagina non disponibile. Riprova più tardi</b>");
	include("err_foot.inc.php");
		exit;
	}

if ($SERVERNAME != $domauth1) { $bb = 1; }
if ($SERVERNAME != $domauth2) { $bb = 2; }
if ($SERVERNAME != $domauth3) { $bb = 3; }
//	echo "<br />:::: ".$bb." ::::<br />";
if (($bb < 1) || ($bb > 3))
	{
		// allora la chiamata non è autorizzata
		echo $lang['keyerrors2']."<br />";
		include $errorfootpage;
		exit;
	}

// HACK ATTEMPT
if ( !defined('IN_KSMS') )
{	die("Hacking attempt");  }

// This method is in implementation...
// TODO : put the language variable in a separte function and in session....
include('lang/english.php');
?>
Return current item: KSMS bulk sms manager