/**
 * Insert attention message
 *
 * This function will show "Attention! This job is ..." message if current user
 * is on job details page and currently viewed job is older than X days.
 *
 * @since 1.0
 * @return void
 */
function push_attention_msg()
{
    $job = null;
    if (is_singular("job")) {
        $query = new Daq_Db_Query();
        $query->from("Wpjb_Model_Job t");
        $query->where("post_id = ?", get_the_ID());
        $query->limit(1);
        $result = $query->execute();
        if (isset($result[0])) {
            $job = $result[0];
        }
    }
    if (is_wpjb() && wpjb_is_routed_to("index.single")) {
        $job = Wpjb_Project::getInstance()->placeHolder->job;
    }
    if ($job === null) {
        return;
    }
    $old = wpjb_conf("front_mark_as_old");
    if ($old > 0 && time() - strtotime($job->job_created_at) > $old * 3600 * 24) {
        $diff = floor((time() - strtotime($job->job_created_at)) / (3600 * 24));
        $msg = _n("Attention! This job posting is one day old and might be already filled.", "Attention! This job posting is %d days old and might be already filled.", $diff, "wpjobboard");
        $flash = new Wpjb_Utility_Session();
        $flash->addInfo(sprintf($msg, $diff));
        $flash->save();
    }
}
 /**
  * Saves resume data
  * 
  * @param array $append Additional data to save
  * @return int Resume ID
  */
 public function save($append = array())
 {
     $user_email = $this->getElement("user_email")->getValue();
     if (!$this->hasElement("user_login")) {
         $user_login = $user_email;
     } else {
         $user_login = $this->getElement("user_login")->getValue();
     }
     $id = wp_insert_user(array("user_login" => $user_login, "user_email" => $user_email, "user_pass" => $this->getElement("user_password")->getValue(), "first_name" => $this->getFieldValue("first_name"), "last_name" => $this->getFieldValue("ldap_start_tlsname"), "role" => "subscriber"));
     $fullname = $this->value("first_name") . " " . $this->value("last_name");
     if (wpjb_conf("cv_approval") == 1) {
         $active = 0;
         // manual approval
     } else {
         $active = 1;
     }
     $resume = new Wpjb_Model_Resume();
     $resume->candidate_slug = Wpjb_Utility_Slug::generate(Wpjb_Utility_Slug::MODEL_RESUME, $fullname);
     $resume->phone = "";
     $resume->user_id = $id;
     $resume->headline = "";
     $resume->description = "";
     $resume->created_at = date("Y-m-d");
     $resume->modified_at = date("Y-m-d");
     $resume->candidate_country = wpjb_locale();
     $resume->candidate_zip_code = "";
     $resume->candidate_state = "";
     $resume->candidate_location = "";
     $resume->is_public = wpjb_conf("cv_is_public", 1);
     $resume->is_active = $active;
     $resume->save();
     $resume->cpt();
     $this->setObject($resume);
     apply_filters("wpjr_form_save_register", $this);
     parent::save($append);
     $resume->created_at = current_time("mysql");
     $resume->candidate_slug = Wpjb_Utility_Slug::generate(Wpjb_Utility_Slug::MODEL_RESUME, $fullname);
     $resume->save();
     return $resume->id;
 }
예제 #3
0
파일: single.php 프로젝트: jomuji/mojobs-1
 * @var $related array List of related jobs
 * @var $show_related boolean
 * @var $show stdClass
 */
?>
<div class="wpjb wpjb-job wpjb-page-single">

    <?php 
wpjb_flash();
?>
    <?php 
$this->render("job.php");
?>

    <?php 
if (!wpjb_conf("front_hide_apply_link")) {
    ?>
    
    <?php 
    if ($members_only) {
        ?>
    <div class="wpjb-job-apply" style="margin:24px 0px;">
        <div class="wpjb-flash-error wpjb-flash-small">
            <span class="wpjb-glyphs wpjb-icon-attention"><?php 
        esc_html_e($form_error);
        ?>
</span>
        </div>
        
        <div>
            <a class="wpjb-button" href="<?php 
예제 #4
0
파일: job.php 프로젝트: jomuji/mojobs-1
    ?>
<span class="wpjb-glyphs wpjb-icon-down-open"></span></a>
                    <?php 
} else {
    ?>
                    <?php 
    esc_html_e($job->locationToString());
    ?>
                    <?php 
}
?>
                </span>
            </div>
                
            <?php 
if (wpjb_conf("show_maps") && $job->getGeo()->status == 2) {
    ?>
            <div class="wpjb-none wpjb-map-slider">
                <iframe style="width:100%;height:350px;margin:0;padding:0;" width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=""></iframe>
            </div>
            <?php 
}
?>
        </div>        
        
        <?php 
if (isset($job->getTag()->type) && is_array($job->getTag()->type)) {
    ?>
        <div class="wpjb-grid-row">
            <div class="wpjb-grid-col wpjb-col-30"><?php 
    _e("Job Type", "wpjobboard");
예제 #5
0
파일: step.php 프로젝트: jomuji/mojobs-1
<ul class="wpjb-add-job-steps">
    <?php 
for ($i = 1; $i <= 3; $i++) {
    ?>
    <li <?php 
    if ($current_step == $i) {
        ?>
class="wpjb-step-current"<?php 
    }
    ?>
>
        <?php 
    #echo "$i. "
    ?>
        <?php 
    esc_html_e(wpjb_conf("seo_step_{$i}", $steps[$i]));
    ?>
        <?php 
    if ($current_step == $i) {
        ?>
<span class="wpjb-arrow wpjb-glyphs wpjb-icon-right-big">&nbsp;</span><?php 
    }
    ?>
    </li>
    <?php 
}
?>
    

</ul>
    
예제 #6
0
파일: company.php 프로젝트: jomuji/mojobs-1
        ?>
<span class="wpjb-glyphs wpjb-icon-down-open"></span></a>
                    <?php 
    } else {
        ?>
                    <?php 
        esc_html_e($company->locationToString());
        ?>
                    <?php 
    }
    ?>
                </span>
            </div>
                
            <?php 
    if (wpjb_conf("show_maps") && $company->getGeo()->status == 2) {
        ?>
            <div class="wpjb-none wpjb-map-slider">
                <iframe style="width:100%;height:350px;margin:0;padding:0;" width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=""></iframe>
                <!--span class="wpjb-glyphs wpjb-icon-arrows-cw wpjb-spin" style="display:block; text-align: center; font-size:64px"></span-->
            </div>
            <?php 
    }
    ?>
        </div>        
        
        <?php 
    if ($company->company_website) {
        ?>
        <div class="wpjb-grid-row">
            <div class="wpjb-grid-col wpjb-col-30"><?php 
예제 #7
0
파일: job.php 프로젝트: robjcordes/nexnewwp
</td>
            </tr>
            <?php 
}
?>
            <?php 
if ($job->locationToString()) {
    ?>
            <tr>
                <td class="wpjb-info-label"><?php 
    _e("Location", WPJB_DOMAIN);
    ?>
</td>
                <td>
                    <?php 
    if (wpjb_conf("show_maps") && $job->getGeo()) {
        ?>
                    <a href="#" class="wpjb-tooltip">
                      <img src="<?php 
        echo wpjb_img("location.png");
        ?>
" alt="" class="wpjb-inline-img" />
                      <span><img src="http://maps.googleapis.com/maps/api/staticmap?center=<?php 
        echo $job->getGeo()->lnglat;
        ?>
&zoom=13&size=500x200&sensor=false" width="500" height="200" /></span>
                    </a>
                    <?php 
    }
    ?>
                    
예제 #8
0
<?php

echo $theme->before_widget;
if ($title) {
    echo $theme->before_title . $title . $theme->after_title;
}
?>

<ul id="wpjb_widget_jobboardmenu" class="wpjb_widget">
    <?php 
if ($can_post) {
    ?>
    <li>
        <a href="<?php 
    echo wpjb_link_to("step_add", null, array(), wpjb_conf("urls_link_job_add"));
    ?>
">
            <?php 
    _e("Soumettre une offre d'emploi", "wpjobboard");
    ?>
        </a>
    </li>
    <?php 
}
?>
    <li>
        <a href="<?php 
echo wpjb_link_to("home");
?>
">
            <?php 
예제 #9
0
    _e("My Resume", "wpjobboard");
    ?>
        </a>
    </li>
    <li>
        <a href="<?php 
    echo wpjr_link_to("myapplications");
    ?>
">
            <?php 
    _e("My Applications", "wpjobboard");
    ?>
        </a>
    </li>
    <?php 
    if (!wpjb_conf("front_hide_bookmarks")) {
        ?>
    <li>
        <a href="<?php 
        echo wpjr_link_to("mybookmarks");
        ?>
">
            <?php 
        _e("My Bookmarks", "wpjobboard");
        ?>
        </a>
    </li>
    <?php 
    }
    ?>
    <li>
예제 #10
0
 public function viewAction()
 {
     if (!$this->_isEnabled()) {
         return false;
     }
     $resume = $this->getObject();
     /* @var $resume Wpjb_Model_Resume */
     if ($resume->user_id != wp_get_current_user()->ID) {
         $canBrowse = $this->_canBrowse();
         if (!$canBrowse && wpjb_conf("cv_privacy", 0) == 1) {
             return false;
         }
     } else {
         $this->view->can_browse = true;
     }
     $text = Wpjb_Project::getInstance()->conf("seo_resumes_view", __("{full_name}", WPJB_DOMAIN));
     $this->_setTitle($text, array("full_name" => $resume->firstname . " " . $resume->lastname));
     $this->view->resume = $resume;
     return "resume";
 }
예제 #11
0
    esc_html_e($v);
    ?>
</option>
                        <?php 
}
?>
                    </select>
                    <input type="submit" value="<?php 
_e("change", "wpjobboard");
?>
" />
                </form>
            </div>
        </div>      
        <?php 
if (is_array(wpjb_conf("cv_show_applicant_resume")) && $application->getResume()) {
    ?>
        <div class="wpjb-grid-row">
            <div class="wpjb-col-30">
                <?php 
    _e("Applicant Resume", "wpjobboard");
    ?>
            </div>
            <div class="wpjb-col-65 wpjb-glyphs wpjb-icon-link-ext-alt">
                <a href="<?php 
    esc_attr_e(wpjr_link_to("resume", $application->getResume(), array("application_id" => $application->id)));
    ?>
"><?php 
    _e("View Resume", "wpjobboard");
    ?>
</a>
/**
 * Add Dropbox App Key config field to form
 *
 * This functin adds "Dropbox App Key" field to form wp-admin / Settings (WPJB)
 * / Common Settings form.
 *
 * @since 1.0
 * @return void
 */
function upload_from_dropbox_config($form)
{
    $e = $form->create("upload_from_dropbox_app_key");
    $e->setValue(wpjb_conf("upload_from_dropbox_app_key"));
    $e->setLabel(__("Dropbox App Key", "upload-from-dropbox"));
    $form->addElement($e);
    return $form;
}