#####################################
# phprofession August 2002 #
# by Aidan Peiser #
# Recruitment module #
# www.phpsolutions.co.uk #
# .,.,.,, #
# C 'C' C #
# > * < #
#####################################
//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 #
?>
#####################################
# phprofession June 2002 #
# by Aidan Peiser #
# Recruitment module for PN.714 #
# www.phpsolutions.co.uk #
# .,.,.,, #
# C 'C' C #
# > * < #
#####################################
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 "
";
if ($offset>=$limit)
{
$newoff=$offset-$limit;
echo ""._JOBPREVIOUS."
";
if ($offset!=$limit*($numpage-1))
{
$newoff=$offset+$limit;
echo ""._JOBNEXT."
";
}
else
{
echo ""._JOBNEXT."";
}
echo "
";
}
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 "
";
for ($x=0; $x$errorList[$x]";
}
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"
Logged in as: $name
";
}
function Admin_menu2($usertype)
{
//Pass: $user_id = user name
//Return: admin menu
echo "