当前位置: 首页>>代码示例>>PHP>>正文


PHP Jobs::jobCreateUpdate方法代码示例

本文整理汇总了PHP中Jobs::jobCreateUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Jobs::jobCreateUpdate方法的具体用法?PHP Jobs::jobCreateUpdate怎么用?PHP Jobs::jobCreateUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jobs的用法示例。


在下文中一共展示了Jobs::jobCreateUpdate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: time

         $file = $_FILES['logo'];
         $path = IMAGE_PATH;
         $data['logo'] = time() . '_' . $file['name'];
         $data['logo_type'] = $file['type'];
         $data['logo_size'] = $file['size'];
         $ext = strtolower(pathinfo($data['logo'], PATHINFO_EXTENSION));
         if (move_uploaded_file($file['tmp_name'], "{$path}{$data['logo']}") && isValidImageExt($ext)) {
             $resize = new ResizeImage("{$path}{$data['logo']}");
             $resize->resizeTo(LOGO_H, LOGO_W);
             $resize->saveImage("{$path}thumb_{$data['logo']}");
         }
     } else {
         $data['logo'] = $job->logo;
     }
     $data['step'] = 3;
     $j->jobCreateUpdate($data, ACTIVE);
     $app->redirect(ADMIN_URL . "jobs/{$id}/publish/{$token}");
 });
 // get publish job details
 $app->get('/:id/publish/:token', 'validateUser', function ($id, $token) use($app) {
     $j = new Jobs($id);
     $job = $j->getJobFromToken($token);
     $title = $j->getSlugTitle();
     $city = $j->getJobCity($job->city);
     $category = $j->getJobCategory($job->category);
     if (isset($job) && $job->id) {
         $app->render(ADMIN_THEME . 'job.publish.php', array('job' => $job, 'city' => $city, 'category' => $category));
     } else {
         $app->redirect(ADMIN_URL . "jobs/{$id}/{$title}");
     }
 });
开发者ID:aescarcha,项目名称:jobskee-open-source-job-board,代码行数:31,代码来源:admin.php

示例2: time

         $data['logo'] = time() . '_' . $file['name'];
         $data['logo_type'] = $file['type'];
         $data['logo_size'] = $file['size'];
         $ext = strtolower(pathinfo($data['logo'], PATHINFO_EXTENSION));
         if (move_uploaded_file($file['tmp_name'], "{$path}{$data['logo']}") && isValidImageExt($ext)) {
             $resize = new ResizeImage("{$path}{$data['logo']}");
             $resize->resizeTo(LOGO_H, LOGO_W);
             $resize->saveImage("{$path}thumb_{$data['logo']}");
         } else {
             $data['logo'] = '';
         }
     } else {
         $data['logo'] = $job->logo;
     }
     $data['step'] = 3;
     $j->jobCreateUpdate($data);
     if (!$j->getStatus()) {
         $app->flash('success', $lang->t('alert|activation_email', $job->email));
     } else {
         $app->flash('success', $lang->t('alert|edit_successful'));
     }
     $app->redirect(BASE_URL . "jobs/{$id}/publish/{$token}");
 });
 // get publish job details
 $app->get('/:id/publish/:token', 'isJobPostAllowed', 'isBanned', 'isValidReferrer', function ($id, $token) use($app) {
     global $lang;
     $j = new Jobs($id);
     $job = $j->getJobFromToken($token);
     $title = $j->getSlugTitle();
     $city = $j->getJobCity($job->city);
     $category = $j->getJobCategory($job->category);
开发者ID:florentsuc,项目名称:jobskee-open-source-job-board,代码行数:31,代码来源:jobs.php


注:本文中的Jobs::jobCreateUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。