califdon wrote:Since we don't know what it's used for, it would have to be a wild guess. All this file does is define 8 constants, if a variable has been set within the file to the value "web". As you posted it, it's not even a valid, standalone PHP file, since the if clause is not terminated with a closing bracket. If this is "included" in another PHP file, we would have to examine that file to determine how the author intended to use that variable. Even then, we might have to guess.
Ok, well, a little background. I purchased a script, from tukanas software. Tukanas has NO faq on his site,k no support system whatsoever, and so this problem nis my own doing, obviously. There is almost no installation instructions for a 5 meg script. Here is a copy of instructions. It is a freelance script and the end result can be seen at itsift.com. also below is the complete file as I recieved it from tukanas. It is called constants.php
INSTALLATION
1- Download archive file from below URL
http://www.tukanas.com/softwares/freelancescript.zip
2 - Import the database
You can find sql file under database_script folder.
3 - Change the connectivity path from
- Constants.php -
like :
define("HOST","localhost");
define("USER","username");
define("PASSWD","passwd");
define("DBNAME","dbname");
4 - Change your mail address and website url on:
note: to easily find lines make [Ctrl] + [F] and write yourwebsite on the cell
PAGE LINE
admin/AdminFunctions.php 59
admin/membersmgmt.php 498 - 501
affiliate.php 2645 - 2649
Constants.php 22
Functions.php 239
manageaccunt.php 2769 2733 - 2737
signup.php 133 - 136 - 353 - 356
uploadport.php 2633 - 2637
uploadportnew.php 2676 - 2680
userregister.php 387 - 401 - 402 - 405 - 407 - 410
You change display messages on Constants.php file.
5 - Upload the script on the server
Other
- You can change validation function by editing:
js/signup1.js (for first registration page)
js/register.js (for second registration page)
js/postproject.js(for post project page)
- To auto-activate new users accounts open userregister.php and change user_adminapproval='inactive' by user_adminapproval='active'
Admin Panel: [location where script installed]/admin/
Password: admin
To change the password edit 'index.php' - line 45
**********************************************************************************************************************
Now the file constants.php
******************************************************************************************
<?php
$application = "web";
if ($application == "web")
{
define("HOST","localhost");
define("USER","user");
define("PASSWD","password");
define("DBNAME","databasename");
define("SITELINK","WEBSITE");
define("SITEIMAGES","sitename here/images/");
define("SITEBANNERS","sitename here/banners/");
define("USERIMGPATH","user_images/");
}
else
{
echo"nathing";
}
define("HOST","localhost");
define("SITEURL","
http://www.yourwebsite.com/"); //site URL that can be used for display
define("INDEX", ""); //defination of index page title
define("TITLE", ""); //title used in header function
define("DEFAULT_MEMBERSHIP_PRICE","$29.95");
/*
* Following constants are defined for the purpose of throwing error messages
* as and when required. The error messages will be called upon by the
* processing file and the contents will be displayed there. Formatting
* can be also applied.
*/
define("ADMINEMAILADDRESS", "
mail@yourdomain.com");
define("PAGESMODIFIED", "Page Contents Modified Successfully.");
define("MODIFYERROR", "Error in Modifying Record.");
define("USERREG", " : New User Registration");
define("LOGINPAGEINTRO","Please write username and password");
define("LOGINFAILED","User not verified");
define("TITLEADMINLOGIN", "Admin Login");
define("INCORRECTFIELDS","<span class=ntxt> Fields mark by <font class=errmsg>(*)</font> are empty or not proper </span>");
define("TITLEADMIN","Admin Area");
define("INCORRECTFILETYPE","<span class=ntxt>File type is not valid</span>");
define("ERRORFILESIZE","<span class=ntxt>File size is too big</span>");
define("INSERTERROR","Failed to save record");
define("MODIFYERROR","Failed to modify in DB");
define("USERLOGIN",": User Login Area");
define("EDITCPASS","Change Password");
define("CPASSMODIFIED","Password has been modified successfully");
//Forums
define("FORUMTITLE", "Forums");
define("FORUMINDEX", "Welcome to Forums");
define("LOGINREQ", "<font class='errmsg'>Its seems you havent logged on, Kindly login to use the Network Mastermind Forums</font>");
define("POSTMSGERROR", "<font class='errmsg'>You have not entered the mandatory fields marked with (*)</fonr>");
//user registration form
define("USERNAMEEXISTS", "<font class='errmsg'>Sorry, the selected username already exists in our database, please select another</font>");
define("EMAILEXISTS", "<font class='errmsg'>Sorry, the selected Email Addresss already exists in our database, please select another</font>");
//Administrator Login Checking Error
define("ADMINLOGINERROR", "<font class='errmsg'>Sorry, password is not match with our database</font>");
?>