including contact instructions for those applying.
- add an employer registration link to the Employer login screen
- add a retrieve employer password link to login screen, by entering an
email address (and maybe an employer login name)
- not sure how to best arrange categories on the Add Job Posting screen,
but the list is difficult to read, or scan.
$min = ($min < 10)?'0'.$min:$min;
$jb_closing_date = $year.'-'.$month.'-'.$day.' '.$hour.':'.$min.':00';
- $job->updateJob($jid, $_POST['jb_title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date, $_POST['jb_approval_state']);
+ $job->updateJob($jid, $_POST['title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date, $_POST['jb_approval_state']);
$msg->addFeedback('JB_POST_UPDATED_SUCCESS');
header('Location: ../index_admin.php');
exit;
$min = ($min < 10)?'0'.$min:$min;
$jb_closing_date = $year.'-'.$month.'-'.$day.' '.$hour.':'.$min.':00';
- $job->addJob($_POST['jb_title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date);
+ $job->addJob($_POST['title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date);
$msg->addFeedback('JB_POST_ADDED_SUCCESSFULLY');
header('Location: home.php');
exit;
//approval state.
$approval_state = ($_config['jb_posting_approval']==1)?AT_JB_POSTING_STATUS_UNCONFIRMED:AT_JB_POSTING_STATUS_CONFIRMED;
- $job->updateJob($jid, $_POST['jb_title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date, $approval_state);
+ $job->updateJob($jid, $_POST['title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date, $approval_state);
$msg->addFeedback('JB_POST_UPDATED_SUCCESS');
header('Location: home.php');
exit;
--- /dev/null
+<?php
+/****************************************************************/
+/* ATutor */
+/****************************************************************/
+/* Copyright (c) 2002-2010 */
+/* Inclusive Design Institute */
+/* http://atutor.ca */
+/* */
+/* 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. */
+/****************************************************************/
+// $Id: bounce.php 10055 2010-06-29 20:30:24Z cindy $
+
+$_user_location = 'public';
+define(AT_INCLUDE_PATH, '../../../include/');
+include(AT_INCLUDE_PATH.'vitals.inc.php');
+include(AT_JB_INCLUDE.'classes/Job.class.php');
+
+if (isset($_POST['cancel'])) {
+ $msg->addFeedback('CANCELLED');
+ header('Location: login.php');
+ exit;
+
+} else if (isset($_POST['form_password_reminder'])) {
+ //get database info to create & email change-password-link
+ $_POST['form_email'] = $addslashes($_POST['form_email']);
+ $sql = "SELECT id, username, employer_name, password, email FROM ".TABLE_PREFIX."jb_employers WHERE email='$_POST[form_email]'";
+ $result = mysql_query($sql,$db);
+ if ($row = mysql_fetch_assoc($result)) {
+
+ //date link was generated (# days since epoch)
+ $gen = intval(((time()/60)/60)/24);
+
+ $hash = sha1($row['id'] + $gen + $row['password']);
+ $hash_bit = substr($hash, 5, 15);
+
+ $change_link = $_base_href.'password_reminder.php?id='.$row['id'].'&g='.$gen.'&h='.$hash_bit;
+ if($row['employer_name'] != ''){
+ $reply_name = $row['employer_name'];
+ }else{
+ $reply_name = $row['employer_name'];
+ }
+ $tmp_message = _AT(array('password_request2',$reply_name, $row['employer_name'], AT_PASSWORD_REMINDER_EXPIRY, $change_link));
+
+ //send email
+ require(AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php');
+ $mail = new ATutorMailer;
+ $mail->From = $_config['contact_email'];
+ $mail->AddAddress($row['email']);
+ $mail->Subject = $_config['site_name'].'-'._AT('job_board') . ': ' . _AT('password_forgot');
+ $mail->Body = $tmp_message;
+
+ if(!$mail->Send()) {
+ $msg->addError('SENDING_ERROR');
+ $savant->display('password_reminder_feedback.tmpl.php');
+ exit;
+ }
+
+ $msg->addFeedback('CONFIRM_EMAIL2');
+ unset($mail);
+
+ $savant->display('password_reminder_feedback.tmpl.php');
+
+ } else {
+ $msg->addError('EMAIL_NOT_FOUND');
+ $savant->display('password_reminder.tmpl.php');
+ }
+
+} else if (isset($_REQUEST['id']) && isset($_REQUEST['g']) && isset($_REQUEST['h'])) {
+//coming from an email link
+
+ //check if expired
+ $current = intval(((time()/60)/60)/24);
+ $expiry_date = $_REQUEST['g'] + AT_PASSWORD_REMINDER_EXPIRY; //2 days after creation
+
+ if ($current > $expiry_date) {
+ $msg->addError('INVALID_LINK');
+ $savant->display('password_reminder_feedback.tmpl.php');
+ exit;
+ }
+
+ /* check if already visited (possibley add a "last login" field to members table)... if password was changed, won't work anyway. do later. */
+
+ //check for valid hash
+ $sql = "SELECT password, email FROM ".TABLE_PREFIX."jb_employers WHERE id=".intval($_REQUEST['id']);
+ $result = mysql_query($sql,$db);
+ if ($row = mysql_fetch_assoc($result)) {
+ $email = $row['email'];
+
+ $hash = sha1($_REQUEST['id'] + $_REQUEST['g'] + $row['password']);
+ $hash_bit = substr($hash, 5, 15);
+
+ if ($_REQUEST['h'] != $hash_bit) {
+ $msg->addError('INVALID_LINK');
+ $savant->display('password_reminder_feedback.tmpl.php');
+ } else if (($_REQUEST['h'] == $hash_bit) && !isset($_POST['form_change'])) {
+ $savant->assign('id', $_REQUEST['id']);
+ $savant->assign('g', $_REQUEST['g']);
+ $savant->assign('h', $_REQUEST['h']);
+ $savant->display('employer/password_change.tmpl.php');
+ }
+ } else {
+ $msg->addError('INVALID_LINK');
+ $savant->display('password_reminder_feedback.tmpl.php');
+ exit;
+ }
+
+ //changing the password
+ if (isset($_POST['form_change'])) {
+
+ /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
+ if ($_POST['password_error'] <> "")
+ {
+ $pwd_errors = explode(",", $_POST['password_error']);
+
+ foreach ($pwd_errors as $pwd_error)
+ {
+ if ($pwd_error == "missing_password")
+ $missing_fields[] = _AT('password');
+ else
+ $msg->addError($pwd_error);
+ }
+ }
+
+ if (!$msg->containsErrors()) {
+ //save data
+ $password = $addslashes($_POST['form_password_hidden']);
+
+ $sql = "UPDATE ".TABLE_PREFIX."jb_employers SET password='".$password."', last_login=last_login WHERE id=".intval($_REQUEST['id']);
+ $result = mysql_query($sql,$db);
+
+ //send confirmation email
+ require(AT_INCLUDE_PATH . 'classes/phpmailer/atutormailer.class.php');
+
+ $tmp_message = _AT(array('password_change_confirm', $_config['site_name'].': '._AT('job_board'), $_base_href))."\n\n";
+
+ $mail = new ATutorMailer;
+ $mail->From = $_config['contact_email'];
+ $mail->AddAddress($email);
+ $mail->Subject = $_config['site_name'] . ': ' . _AT('password_forgot');
+ $mail->Body = $tmp_message;
+
+ if(!$mail->Send()) {
+ $msg->printErrors('SENDING_ERROR');
+ exit;
+ }
+
+ $msg->addFeedback('PASSWORD_CHANGED');
+ unset($mail);
+
+ header('Location:index.php');
+
+ } else {
+ $savant->assign('id', $_REQUEST['id']);
+ $savant->assign('g', $_REQUEST['g']);
+ $savant->assign('h', $_REQUEST['h']);
+ $savant->display('password_change.tmpl.php');
+ }
+ }
+
+} else {
+ $savant->display('password_reminder.tmpl.php');
+}
+
+
+?>
\ No newline at end of file
<?php
-/***********************************************************************/
-/* ATutor */
-/***********************************************************************/
-/* Copyright (c) 2002-2009 */
-/* Adaptive Technology Resource Centre / Inclusive Design Institute */
-/* http://atutor.ca */
-/* */
-/* 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. */
-/***********************************************************************/
+/****************************************************************/
+/* ATutor */
+/****************************************************************/
+/* Copyright (c) 2002-2010 */
+/* Inclusive Design Institute */
+/* http://atutor.ca */
+/* */
+/* 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. */
+/****************************************************************/
// $Id$
$_user_location='public';
define(AT_INCLUDE_PATH, '../../../include/');
<form action="" method="post" name="form">
<div class="row">
<label for="jb_title"><?php echo _AT('jb_title'); ?></label>
- <input type="text" id="jb_title" name="jb_title" value="<?php echo htmlentities_utf8($this->job_post['title']); ?>" />
+ <input type="text" id="jb_title" name="title" value="<?php echo htmlentities_utf8($this->job_post['title']); ?>" />
</div>
<div class="row">
<label><?php echo _AT('jb_categories'); ?></label><br/>
<?php if(!empty($this->categories)): ?>
<?php foreach($this->categories as $category): ?>
- <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
- <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" <?php echo ($this->job_post['categories'] && in_array($category['id'], $this->job_post['categories']))?'checked="checked"':''; ?> /> |
+ <div class="category_box">
+ <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" <?php echo ($this->job_post['categories'] && in_array($category['id'], $this->job_post['categories']))?'checked="checked"':''; ?> />
+ <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
+ </div>
<?php endforeach; endif; ?>
+ <div style="clear:both;"></div>
</div>
<div class="row">
<label for="jb_is_public"><?php echo _AT('jb_is_public'); ?></label>
?>
</div>
<div class="row">
- <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_description'); ?></label><br />
+ <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
+ <small>· <?php echo _AT('jb_post_description_note'); ?></small><br />
<textarea name="jb_description" cols="55" rows="15" id="jb_description"><?php echo $_POST['jb_description']; ?><?php echo $this->job_post['description']; ?></textarea>
</div>
<div class="row">
}
?>
<div class="input-form">
- <form action="" method="post">
+ <form name="form" action="" method="post">
<div class="row">
<label for="jb_title"><?php echo _AT('jb_title'); ?></label>
- <input type="text" id="jb_title" name="jb_title" />
+ <input type="text" id="jb_title" name="title" />
</div>
<div class="row">
<label><?php echo _AT('categories'); ?></label><br/>
<?php if(!empty($this->categories)): ?>
<?php foreach($this->categories as $category): ?>
- <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
- <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" /> |
+ <div class="category_box">
+ <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" />
+ <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
+ </div>
<?php endforeach; endif; ?>
+ <div style="clear:both;"></div>
</div>
<div class="row">
<label for="jb_is_public"><?php echo _AT('jb_is_public'); ?></label>
</div>
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
+ <small>· <?php echo _AT('jb_post_description_note'); ?></small><br />
<textarea name="jb_description" cols="55" rows="15" id="jb_description"><?php echo $_POST['jb_description']; ?><?php echo $this->job_post['description']; ?></textarea>
</div>
<div class="row">
?>
<div class="input-form">
- <form action="" method="post">
+ <form action="" method="post" name="form">
<div class="row">
<label for="jb_title"><?php echo _AT('jb_title'); ?></label>
- <input type="text" id="jb_title" name="jb_title" value="<?php echo htmlentities_utf8($this->job_post['title']); ?>" />
+ <input type="text" id="jb_title" name="title" value="<?php echo htmlentities_utf8($this->job_post['title']); ?>" />
</div>
<div class="row">
<label><?php echo _AT('categories'); ?></label><br/>
<?php if(!empty($this->categories)): ?>
<?php foreach($this->categories as $category): ?>
- <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
- <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" <?php echo ($this->job_post['categories'] && in_array($category['id'], $this->job_post['categories']))?'checked="checked"':''; ?> /> |
+ <div class="category_box">
+ <input type="checkbox" id="jb_category_<?php echo $category['id'];?>" name="jb_categories[]" value="<?php echo $category['id']; ?>" <?php echo ($this->job_post['categories'] && in_array($category['id'], $this->job_post['categories']))?'checked="checked"':''; ?> />
+ <label for="jb_category_<?php echo $category['id'];?>"><?php echo htmlentities_utf8($category['name']); ?></label>
+ </div>
<?php endforeach; endif; ?>
+ <div style="clear:both;"></div>
</div>
<div class="row">
<label for="jb_is_public"><?php echo _AT('jb_is_public'); ?></label>
</div>
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
+ <small>· <?php echo _AT('jb_post_description_note'); ?></small><br />
<textarea name="jb_description" cols="55" rows="15" id="jb_description"><?php echo $_POST['jb_description']; ?><?php echo $this->job_post['description']; ?></textarea>
</div>
<input type="password" class="formfield" name="form_password" style="max-width: 80%; width: 80%;" id="pass" />
<br /><br />
<input type="submit" name="submit" value="<?php echo _AT('login'); ?>" class="button" onclick="encrypt_password();" />
+ <a href="<?php echo AT_JB_BASENAME;?>employer/registration.php"><?php echo _AT('jb_employer_registration'); ?></a> |
+ <a href="<?php echo AT_JB_BASENAME;?>employer/password_reminder.php"><?php echo _AT('password_reminder'); ?></a>
</fieldset>
</form>
</div>
--- /dev/null
+<?php
+global $onload;
+$onload = 'document.form.password.focus();';
+
+require(AT_INCLUDE_PATH.'header.inc.php');
+?>
+
+<script language="JavaScript" src="sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+ document.form.password_error.value = "";
+
+ err = verify_password(document.form.password.value, document.form.password2.value);
+
+ if (err.length > 0)
+ {
+ document.form.password_error.value = err;
+ }
+ else
+ {
+ document.form.form_password_hidden.value = hex_sha1(document.form.password.value);
+ document.form.password.value = "";
+ document.form.password2.value = "";
+ }
+}
+</script>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+ <input type="hidden" name="form_change" value="true" />
+ <input type="hidden" name="id" value="<?php echo $this->id; ?>" />
+ <input type="hidden" name="g" value="<?php echo $this->g; ?>" />
+ <input type="hidden" name="h" value="<?php echo $this->h; ?>" />
+ <input type="hidden" name="form_password_hidden" value="" />
+ <input type="hidden" name="password_error" value="" />
+
+ <div class="input-form" style="width: 400px;">
+ <div class="row">
+ <?php echo _AT('password_new_blurb'); ?>
+ </div>
+
+ <div class="row">
+ <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="password"><?php echo _AT('password'); ?></label><br />
+ <input id="password" name="password" type="password" size="15" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password'])); ?>" /><br />
+ <small>· <?php echo _AT('combination'); ?><br />
+ · <?php echo _AT('15_max_chars'); ?></small>
+ </div>
+
+ <div class="row">
+ <span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="password2"><?php echo _AT('password_again'); ?></label><br />
+ <input id="password2" name="password2" type="password" size="15" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password2'])); ?>" />
+ </div>
+
+ <div class="row buttons">
+ <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onClick="encrypt_password()" />
+ <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+ </div>
+ </div>
+</form>
+
+<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
<tr>
<td><?php echo _AT('jb_categories'); ?></td>
<td>
- <div>
- <input type="checkbox" name="jb_search_categories[]" value="0" id="jb_search_category_0" <?php if(!empty($_GET['jb_search_categories']) && in_array(0, $_GET['jb_search_categories'])){echo 'checked="checked"';} ?>/>
- <label for="jb_search_category_0"><?php echo _AT('jb_any_categories');?></label>
+ <div class="category_box">
+ <input type="checkbox" name="jb_search_categories[]" value="0" id="jb_search_category_0" <?php if(!empty($_GET['jb_search_categories']) && in_array(0, $_GET['jb_search_categories'])){echo 'checked="checked"';} ?>/>
+ <label for="jb_search_category_0"><?php echo _AT('jb_any_categories');?></label>
+ </div>
<?php foreach($this->job_obj->getCategories() as $category): ?>
- <div>
+ <div class="category_box">
<?php
if(!empty($_GET['jb_search_categories'])){
if(in_array($category['id'], $_GET['jb_search_categories'])){
<label for="<?php echo 'jb_search_category_'.$category['id']; ?>"><?php echo $this->job_obj->getCategoryNameById($category['id']); ?></label>
</div>
<?php endforeach; ?>
- </div>
</td>
</tr>
<tr>
<?php
-/***********************************************************************/
-/* ATutor */
-/***********************************************************************/
-/* Copyright (c) 2002-2009 */
-/* Adaptive Technology Resource Centre / Inclusive Design Institute */
-/* http://atutor.ca */
-/* */
-/* 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. */
-/***********************************************************************/
+/****************************************************************/
+/* ATutor */
+/****************************************************************/
+/* Copyright (c) 2002-2010 */
+/* Inclusive Design Institute */
+/* http://atutor.ca */
+/* */
+/* 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. */
+/****************************************************************/
// $Id$
$_user_location='public';
define(AT_INCLUDE_PATH, '../../include/');
box-shadow: .1em .1em .1em #999999;
}
-
textarea#jb_description{
width: 99%;
height: 600px;
}
-
div.jb_view_container{
-border:1px solid #cccccc;
-background-color:#eeffff;
-padding:1em;
-line-height:1.5em;
-margin-bottom:1em;
-border-radius: .5em .5em .5em .5em;
- -moz-border-radius: .5em .5em .5em .5em;
- -moz-box-shadow:.1em .1em .1em #999999;
- box-shadow: .1em .1em .1em #999999;
+ border:1px solid #cccccc;
+ background-color:#eeffff;
+ padding:1em;
+ line-height:1.5em;
+ margin-bottom:1em;
+ border-radius: .5em .5em .5em .5em;
+ -moz-border-radius: .5em .5em .5em .5em;
+ -moz-box-shadow:.1em .1em .1em #999999;
+ box-shadow: .1em .1em .1em #999999;
}
div.jb_view_container label{
font-weight: bold;
margin-left: 5em;
background: #eeeeee;
}
+div.category_box{
+ width: 40%;
+ float: left;
+}
/* add to cart template style */
div.add_to_cart{
$this->_pages[AT_JB_BASENAME.'employer/login.php']['parent'] = AT_JB_BASENAME.'index.php';
$this->_pages[AT_JB_BASENAME.'employer/registration.php']['title_var'] = 'jb_employer_registration';
$this->_pages[AT_JB_BASENAME.'employer/registration.php']['parent'] = AT_JB_BASENAME.'index.php';
+$this->_pages[AT_JB_BASENAME.'employer/password_reminder.php']['title_var'] = 'password_reminder';
+$this->_pages[AT_JB_BASENAME.'employer/password_reminder.php']['parent'] = AT_JB_BASENAME.'index.php';
$this->_pages[AT_JB_BASENAME.'employer/home.php']['title_var'] = 'jb_employer_home';
$this->_pages[AT_JB_BASENAME.'employer/home.php']['parent'] = AT_JB_BASENAME.'index.php';
INSERT INTO `language_text` VALUES ('en', '_module','jb_archive','Archive',NOW(),'');
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_closing_date','Closing Date',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_login','Post a Job',NOW(),'');
INSERT INTO `language_text` VALUES ('en', '_module','jb_logout','Logout',NOW(),'');