$email = $_POST['jb_employer_email'];
$email2 = $_POST['jb_employer_email2'];
$website = $_POST['jb_employer_website'];
+ $description = $_POST['jb_employer_description'];
$approval_state = $_POST['jb_employer_approval_state'];
//check if email has been changed. If it's been changed, check the 2 emails.
//set approval state
$employer->setApprovalState($approval_state);
- if ($employer->updateProfile($name, $company, $email, $website)){
+ if ($employer->updateProfile($name, $company, $email, $website, $description)){
$msg->addFeedback('JB_PROFILE_UPDATED');
} else {
$msg->addError('DB_NOT_UPDATED');
$savant->assign('company', $employer->getCompany());
$savant->assign('email', $employer->getEmail());
$savant->assign('website', $employer->getWebsite());
+$savant->assign('description', $employer->getDescription());
$savant->assign('approval_state', $employer->getApprovalState());
$savant->display('admin/jb_edit_employer.tmpl.php');
include(AT_INCLUDE_PATH.'footer.inc.php');
}
include(AT_INCLUDE_PATH.'header.inc.php');
-$savant->display('employer/jb_employer_header.tmpl.php');
echo '<div class="pageinator_box">';
+$savant->display('employer/jb_employer_header.tmpl.php');
print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
echo '</div>';
$savant->assign('job_obj', $job);
$email = $_POST['jb_employer_email'];
$email2 = $_POST['jb_employer_email2'];
$website = $_POST['jb_employer_website'];
+ $description = $_POST['jb_employer_description'];
//check if email has been changed. If it's been changed, check the 2 emails.
if ($email!=$employer->getEmail()){
$employer->updatePassword($pass);
}
- if ($employer->updateProfile($name, $company, $email, $website)){
+ if ($employer->updateProfile($name, $company, $email, $website, $description)){
$msg->addFeedback('JB_PROFILE_UPDATED');
} else {
$msg->addFeedback('DB_NOT_UPDATED');
$savant->assign('company', $employer->getCompany());
$savant->assign('email', $employer->getEmail());
$savant->assign('website', $employer->getWebsite());
+$savant->assign('description', $employer->getDescription());
$savant->display('employer/jb_profile.tmpl.php');
include(AT_INCLUDE_PATH.'footer.inc.php');
?>
}
function getName(){
- return htmlentities_utf8($this->name);
+ return $this->name;
}
function getEmail(){
- return htmlentities_utf8($this->email);
+ return $this->email;
}
function getCompany(){
- return htmlentities_utf8($this->company);
+ return $this->company;
}
function getDescription(){
- return htmlentities_utf8($this->description);
+ return $this->description;
}
function getWebsite(){
- return htmlentities_utf8($this->website);
+ return $this->website;
}
function getLastLogin(){
* @param string company's name
* @param string employer's email
* @param string employer's website.
+ * @param string employer's description
* @return null
*/
- function updateProfile($name, $company, $email, $website){
+ function updateProfile($name, $company, $email, $website, $description){
global $addslashes, $db;
$name = $addslashes($name);
$company = $addslashes($company);
$email = $addslashes($email);
$website = $addslashes($website);
+ $description = $addslashes($description);
- $sql = 'UPDATE '.TABLE_PREFIX."jb_employers SET employer_name='$name', company='$company', email='$email', website='$website' WHERE id=".$this->id;
+ $sql = 'UPDATE '.TABLE_PREFIX."jb_employers SET employer_name='$name', company='$company', email='$email', website='$website', description='$description' WHERE id=".$this->id;
$result = mysql_query($sql, $db);
if ($result){
return true;
*/
function addJob($title, $description, $categories, $is_public, $closing_date){
require(AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php');
- global $addslashes, $db, $msg, $_config;
+ global $addslashes, $db, $msg, $_config, $_base_href;
if($_SESSION['jb_employer_id']<1){
$msg->addError(); //authentication error
exit;
+ } else {
+ include(AT_JB_INCLUDE.'Employer.class.php');
+ $employer = new Employer($_SESSION['jb_employer_id']);
+ $employer_id = $employer->getId();
}
$title = $addslashes($title);
$is_public = (isset($is_public))?1:0;
$closing_date = $addslashes($closing_date);
$approval_state = ($_config['jb_posting_approval']==1)?AT_JB_POSTING_STATUS_UNCONFIRMED:AT_JB_POSTING_STATUS_CONFIRMED;
- $sql = 'INSERT INTO '.TABLE_PREFIX."jb_postings (employer_id, title, description, is_public, closing_date, created_date, revised_date, approval_state) VALUES ($_SESSION[jb_employer_id], '$title', '$description', $is_public, '$closing_date', NOW(), NOW(), $approval_state)";
+ $sql = 'INSERT INTO '.TABLE_PREFIX."jb_postings (employer_id, title, description, is_public, closing_date, created_date, revised_date, approval_state) VALUES ($employer_id, '$title', '$description', $is_public, '$closing_date', NOW(), NOW(), $approval_state)";
$result = mysql_query($sql, $db);
$posting_id = mysql_insert_id();
foreach($categories as $id => $category){
$category = intval($category);
$sql = 'INSERT INTO '.TABLE_PREFIX."jb_posting_categories (posting_id, category_id) VALUES ($posting_id, $category)";
- mysql_query($sql, $db);
+ mysql_query($sql, $db);
//send out notification if the person is subscribed to the category.
$sql = 'SELECT m.member_id, m.email FROM '.TABLE_PREFIX.'jb_category_subscribes cs LEFT JOIN '.TABLE_PREFIX."members m ON cs.member_id=m.member_id WHERE category_id=$category";
$result = mysql_query($sql, $db);
+ $post_link = $_base_href . AT_JB_BASENAME . 'view_post.php?jid='.$posting_id;
if($result){
while($row = mysql_fetch_assoc($result)){
$mail = new ATutorMailer;
$mail->AddAddress($row['email'], get_display_name($row['member_id']));
- $body = _AT('jb_subscription_msg', $this->getCategoryNameById($category), $title);
- $body .= "\n----------------------------------------------\n";
- $body .= _AT('posted_by').": ".get_display_name($row['member_id'])."\n";
+ $body = _AT('jb_subscription_msg', $title, $this->getCategoryNameById($category), $post_link);
+ $body .= "\n\n";
+ $body .= _AT('jb_posted_by').": ".htmlentities_utf8($employer->getCompany())."\n";
$mail->FromName = $_config['site_name'];
$mail->From = $_config['contact_email'];
$mail->Subject = _AT('jb_subscription_mail_subject');
define('AT_JB_BASE', AT_INCLUDE_PATH.'../mods/job_board/');
define('AT_JB_INCLUDE', AT_JB_BASE.'include/');
-define('AT_JB_ROWS_PER_PAGE', 5); //row per page constant, default is 50 (same as output.inc.php)
+define('AT_JB_ROWS_PER_PAGE', 10); //row per page constant, default is 50 (same as output.inc.php)
//Employer Statuses
<input type="text" name="jb_employer_website" id="jb_employer_website" value="<?php echo htmlentities_utf8($this->website); ?>"/>
</div>
+<div class="row">
+ <label for="jb_employer_description"><?php echo _AT('jb_company_description'); ?></label><br/>
+ <textarea id="jb_employer_description" name="jb_employer_description" ><?php echo htmlentities_utf8($this->description); ?></textarea>
+ </div>
+
<div class="row">
<input type="hidden" name="jb_employer_password_hidden" value="" />
<input class="hidden" name="jb_employer_password_error" />
<?php if(!empty($this->employers)): ?>
<?php foreach($this->employers as $employer): ?>
<tr>
- <td><?php echo $employer->getUsername(); ?></td>
- <td><?php echo $employer->getName(); ?></td>
- <td><?php echo $employer->getEmail(); ?></td>
- <td><?php echo $employer->getCompany(); ?></td>
- <td><?php echo $employer->getDescription(); ?></td>
- <td><?php echo $employer->getWebsite(); ?></td>
- <td><?php echo $employer->getLastLogin(); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getUsername()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getName()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getEmail()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getCompany()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getDescription()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getWebsite()); ?></td>
+ <td><?php echo htmlentities_utf8($employer->getLastLogin()); ?></td>
<?php
switch($employer->getApprovalState()){
case AT_JB_STATUS_UNCONFIRMED:
<td><a href="<?php echo AT_JB_BASENAME.'admin/view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
<td><?php
$employer = new Employer($row['employer_id']);
- echo $employer->getCompany();
+ echo htmlentities_utf8($employer->getCompany());
?>
</td>
<td>
<a href="<?php echo AT_JB_BASENAME;?>employer/registration.php"><?php echo _AT('jb_employer_registration');?></a>
<?php endif; ?>
</div>
+<div style="clear:both;"></div>
<td><a href="<?php echo AT_JB_BASENAME.'employer/view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
<td><?php
$employer = new Employer($row['employer_id']);
- echo $employer->getCompany();
+ echo htmlentities_utf8($employer->getCompany());
?>
</td>
<td>
<input type="text" name="jb_employer_website" id="jb_employer_website" value="<?php echo htmlentities_utf8($this->website); ?>"/>
</div>
+ <div class="row">
+ <label for="jb_employer_description"><?php echo _AT('jb_company_description'); ?></label><br/>
+ <textarea id="jb_employer_description" name="jb_employer_description" ><?php echo htmlentities_utf8($this->description); ?></textarea>
+ </div>
+
<div class="row">
<input type="hidden" name="jb_employer_password_hidden" value="" />
<input class="hidden" name="jb_employer_password_error" />
$search_string = SEP.$search_string;
}
?>
-<?php if(isset($_SESSION['member_id']) && $_SESSION['member_id'] >0): ?>
-<div>
- <a href="<?php echo AT_JB_BASENAME.'subscribe.php'; ?>"><?php echo _AT('jb_subscribe'); ?></a>
-</div>
-<?php endif; ?>
-
<div>
<table class="data static" summary="" rules="rows">
<thead>
<td><a href="<?php echo AT_JB_BASENAME.'view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
<td><?php
$employer = new Employer($row['employer_id']);
- echo $employer->getCompany();
+ echo htmlentities_utf8($employer->getCompany());
?>
</td>
<td>
</form>
<div style="clear:both;"></div>
<div>
-<?php
-print_paginator($page, sizeof($all_job_posts), $search_string.SEP.$page_string, AT_JB_ROWS_PER_PAGE);
+<div class="pageinator_box">
+<?php if(isset($_SESSION['member_id']) && $_SESSION['member_id'] >0): ?>
+<div style="clear:left;">
+ <a href="<?php echo AT_JB_BASENAME.'subscribe.php'; ?>"><?php echo _AT('jb_subscribe'); ?></a>
+</div>
+<?php endif; ?>
+<?php print_paginator($page, sizeof($all_job_posts), $search_string.SEP.$page_string, AT_JB_ROWS_PER_PAGE); ?>
+</div>
+<?php
$savant->assign('job_posts', $current_job_posts);
$savant->assign('bookmark_posts', $bookmark_posts);
$savant->assign('job_obj', $job);
INSERT INTO `language_text` VALUES ('en', '_module','jb_company_description','Company Description',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_post_description','Description',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_post_description_note','Description should include Job Overview, Responsibilities, Qualifications, Contact Information',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_module','jb_posted_by','Job posted by:',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_closing_date','Closing Date',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_login','Employer sign-in',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_logout','Employer sign-out',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_confirmed','Confirmed',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_unconfirmed','Unconfirmed',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state','Approval State',NOW(),'');
-
INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_confirmed','Approved',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_unconfirmed','Disapproved',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_required_posting_approval','New posting requires approval',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_email_confirmation_message','You have registered for a job board account on %1s. Please finish the registration process by confirming your email address by using the following link: %2s.',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_add_to_cart','Bookmark this post',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_remove_from_cart','Remove this bookmark',NOW(),'');
-INSERT INTO `language_text` VALUES ('en', '_module','jb_subscription_msg','Hi, a new job post titled %2s has been added to the ATutor Job Board %1s category.',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_module','jb_subscription_msg','Hi, \n\nA new job post titled %2s has been added to the ATutor Job Board %1s category. The job post can be found at the following link, %3s.',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_subscription_mail_subject','New Job Post in ATutor',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_any_categories','Any categories',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_view_job_post','View a job post',NOW(),'');