* < # ##################################### //https://sourceforge.net/projects/profession/ error_reporting(); //You are free to edit this source as much as you want and claim it as your own. Just remember the original source is posted on SourceForge, http://phprofession.sourceforge.net Converted for Postnuke (http://www.postnuke.com) by steven.dowd@postnuke.netPlease leave My details in this File . //admin name and pass is created when you use the install script, because of MD5 password encryption please use this script to install phprofession //you are going to have to edit only this config page // MySQL Database Connections //you must change all the details in this file to suit your site before installing $database = "odinsear_jobs2"; $user = "odinsear_lee"; $pass = "lee"; $hostname = "odinsear.ipowermysql.com"; $prefix = "php"; // Connect to Database $connection = mysql_connect($hostname, $user, $pass) or die ("Unable to connect to MySQL! Correct your data in your config file for phprofession."); // other options $startpage = "Joblist"; //select 'cmd' of the page you want the user to open first you can see this in the url or in the index file $websiteurl = "http://www.odinsearchgroup.com"; //"http://www.yourwebsite.com" site url do not end url with a '/' and no sub folders after this , if you have sub folders add them to the ModuleDirName variable $ModuleDirName = "jobs"; // directory your stabd alone scripts are in. $Admin_Email = "lee@odinsearchgroup.com"; //your admin email for the phprofession $Version = "Odin Search Group Jobs Listing"; //phprofession version $path = "upload/"; //make shure the uploads folder is chmod = 777 $upload_file_name = "userfile"; // Accept GIF and JPEG files //$acceptable_file_types = "image/gif|image/jpeg|image/pjpeg"; // Accept ALL files $acceptable_file_types = ""; $default_extension = ".doc"; // MODE: if your are attempting to upload a file with the same name as another file in the $path directory // 1 = overwrite mode // 2 = create new with incremental extention // 3 = do nothing if exists, highest protection $mode = 2; $height = "450"; //height of tell a friend pop up window $width = "310"; //width of tell a friend pop up window $logopath = "$websiteurl/images/logo.gif"; //used for logo in tell a friend pop up box and sent in emails $uploadpassword = "password"; //password required to axcess file manager in upload folder for admin section change it here $listings = "20"; //the number of jobs to be displayed per page $maxlisting = "100"; $days = "200"; //how old the jobs can be till they must be taken off the job list $limit = "600"; //limit the amount of characters to be put into the data base for job postings MySQL set to varchar 255 change this to text if you want more! $language = "eng"; //set this to your default language $allowpost = "1"; //1 to allow other users to post 0 to have no other users must go directly to the admin page to login then. $WaitingContent = "0"; //1 for the post to be checked before added 0 for post to go live strait away // Apply form display options $Education_Section = "2"; //go to index.php line 680 +/- for info on how to take this field out completely # $Employment_History = "2"; //go to index.php line 715 +/- for info on how to take this field out completely # $Skills_Section = "3"; //go to index.php line 790 +/- for info on how to take this field out completely # $References = "2"; //go to index.php line 810 +/- for info on how to take this field out completely # // module url links $redirect_error = "$websiteurl/$ModuleDirName/handle_error.php"; //Full URL to handle_error.php $create_login_success = "$websiteurl/$ModuleDirName/post.php?login=true"; //Full URL to your website $login_success = "$websiteurl/$ModuleDirName/post.php"; //Full URL to your website $terms = "You must be logged in to change or add postings."; $AdminDirName = "$ModuleDirName"; $ModuleBasePath = "./modules/$ModuleDirName"; $ModuleBaseUrl = "modules.php?op=modload&name=$ModuleDirName&file"; $ModuleAdminUrl = "modules.php?op=modload&name=$AdminDirName&file"; $ModuleUploadUrl = "upload/index.php"; //this file must not go through the modules.php file ,to work correctly it must be accessed directly # ?> * < # ##################################### function fixDate($val) { // Format MySQL Date Values //Pass: $val = date stamp //Return: date stamp in d M Y format $arr = explode(" ", $val); $datearr = explode("-", $arr[0]); return date("d M Y", mktime(0, 0, 0, $datearr[1], $datearr[2], $datearr[0])); } function phprofession_language($script = 'global') { // Get phprofession language choice //Pass: $script name of language file with out the php default is global //Return: Nothing it includes the language file global $ModName, $currentlang; if (file_exists("lang/$currentlang/$script.php")) { @include "lang/$currentlang/$script.php"; } elseif (file_exists("lang/$language/$script.php")) { @include "lang/$language/$script.php"; } else { $currentlang = "eng"; @include "lang/$currentlang/$script.php"; } } function pagenav($page) { // pageing function //Pass: page name eg:index //Return:page listings with next or previous links global $limit,$offset,$numpage,$ModuleBaseUrl,$cmd; echo "
"; } else { echo ""._JOBPREVIOUS.""; } echo ""; } else { echo ""._JOBNEXT.""; } echo "
"; if ($offset>=$limit) { $newoff=$offset-$limit; echo ""._JOBPREVIOUS."   "; for ($i=1;$i<=$numpage;$i++) { if ((($i-1)*$limit)==$offset) { print "$i "; } else { $newoff=($i-1)*$limit; echo "$i "; } } echo "  "; if ($offset!=$limit*($numpage-1)) { $newoff=$offset+$limit; echo ""._JOBNEXT."
"; } function isEmailInvalid($val) { // E-Mail Validity Check //Pass: $val = a email eg aidan@phpsolutions.co.uk //Return: true if email is valid false if not valid $pattern = "/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/"; if(preg_match($pattern, $val)) { return false; } else { return true; } } function listErrors() { // List of errors after validating the form //Pass: nothing //Return: your error message global $errorList; echo "The following errors were encountered:
"; echo ""; echo "Click here to go back to the previous page and correct the errors"; } function Admin_menu($name) { //Pass: $user_id = user name //Return: admin menu echo""; } function Admin_menu2($usertype) { //Pass: $user_id = user name //Return: admin menu echo "
Logged in as: $name
"; echo "Browse"; echo " |   Add Jobs"; if ($usertype == 1){ echo " |   Requests"; } echo " |   Job Categories"; echo " |   Locations"; echo " |   Account Settings"; if ($usertype ==1){ echo " |   Manage Accounts"; } echo "

"; } function User_Menu($ModuleBaseUrl) { echo"


"._JOBBOTGOBACK."  | "._JOBBOTLISTING."  | "._JOBBOTDEP."  | "._JOBBOTRECRUITING."  | "._JOBBOTPOST."

"; } function draw_create_login_box($title, $width, $ModuleDirName) { echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
$title
Username
Password
Confirm Password
Email Address
Company
Contact Number
\n"; } function draw_create_admin_login_box($title, $width, $ModuleDirName) { echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "
Username:
Password:
Confirm Password:
 
 
"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo ""; echo ""; echo "\n"; echo ""; echo ""; echo "\n"; echo "
Name:
E-mail:
Phone:(817)348-8900 ext:
 
 
Allow Admin Privileges?   
 
 
\n"; } function draw_login_box ($title, $width, $ModuleDirName) { echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Login
Username
Password

\n"; } function init_session ($name) { setcookie ("authok", $name ,time()+7200, "/", '', 0); } function kill_session() { setcookie ("authok", "",time()-36000, "/", '', 0); } function verify_session ($md5) { $ModName = basename(dirname(__FILE__)); include("config.php"); mysql_connect($hostname, $user, $pass) or die("Could not connect"); mysql_select_db($database) or die("Could not select database"); $result = mysql_query("SELECT * FROM {$prefix}_jobaccounts WHERE md5='$md5'"); $row_array = mysql_fetch_array($result); if ($row_array[0] != "") { return $row_array[0]; } else { return "FALSE"; } } function redirect ($url) { echo ""; exit; } function OpenTable() { } function CloseTable() { } ?> Odin Search Group
Odin Search Group  
job center submit resume contact us