This commit is contained in:
2022-07-23 12:56:36 -04:00
parent 24c39db3e8
commit 49c5e94dd5
3 changed files with 125 additions and 228 deletions
+3 -17
View File
@@ -1378,21 +1378,17 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] );
public function manage() {
$data = $this->getSessionArray();
$this->load->library('table');
$this->table->set_template($this->template);
$jbx = "''/jobs/processjob''";
$mysql = "SELECT '<b>Date: </b>'||created::date||'<br><b>Timeline: </b>'||timeline_days||' day(s)'||'<br><b>Price: </b>'||price*0.01||' ' AS Job,"
. " '<b>Title: </b>'||title||'<br><b>Description: </b>'||description AS detail, "
. " '<table><tr><td><input type=button onclick=\"return post_nav_find_action($jbx, '||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"View\"></td><td><div id=\"subdel'||id||'\" ><input type=button id=\"dacc'||id||'\" onclick=\"return deleteJob('||id||')\" name=\"manage\" class=\"btn btn-warning btn-xs\" value=\"Del\"></td></tr></table>' AS manage"
. " FROM members_jobs WHERE member_id = " . $_SESSION['member_id'] . " AND status=1 ORDER BY id DESC";
$this->load->library('pagination');
$config = array();
$query = $this->db->query($mysql);
$config["total_rows"] = $query->num_rows();
$_SESSION['total_job_count'] = $config["total_rows"];
$config["base_url"] = base_url() . "/jobs/manage";
$config["per_page"] = 10;
$config["uri_segment"] = 3;
@@ -1414,32 +1410,22 @@ echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] );
$config['last_tagl_close'] = "</li>";
$this->pagination->initialize($config);
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
/*
$mysql = "SELECT '<b>Date: </b>'||created::date||'<br><b>Timeline: </b>'||timeline_days||' day(s)'||'<br><b>Price: </b>'||price*0.01||' ' AS Job,"
. " '<b>Title: </b>'||title||'<br><b>Description: </b>'||description AS detail, "
. " '<table><tr><td><input type=button onclick=\"return post_nav_find_action($jbx, '||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"View\"><div id=\"subdel'||id||'\" ></td><td><input type=button id=\"dacc'||id||'\" onclick=\"return deleteJob('||id||')\" name=\"manage\" class=\"btn btn-warning btn-xs\" value=\"Del\"></td></tr></table>' AS manage"
. " FROM members_jobs WHERE member_id = " . $_SESSION['member_id'] . " AND status=1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
*/
$mysql = "SELECT id AS job_id, '<b>Date: </b>'||created::date||'<br><b>Timeline: </b>'||timeline_days||' day(s)'||'<br><b>Price: </b>'||price*0.01||' ' AS Job,"
. " title, description,timeline_days, price*0.01 AS amount,"
. " '<table><tr><td><input type=button onclick=\"return post_nav_find_action($jbx, '||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"View\"><div id=\"subdel'||id||'\" ></td><td><input type=button id=\"dacc'||id||'\" onclick=\"return deleteJob('||id||')\" name=\"manage\" class=\"btn btn-warning btn-xs\" value=\"Del\"></td></tr></table>' AS manage"
. " FROM members_jobs WHERE member_id = " . $_SESSION['member_id'] . " AND status=1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Job/Task', 'style' => 'width:150px'), 'Title/Description', array('data' => 'Manage', 'style' => 'width:120px'));
$data["links"] = $this->pagination->create_links();
// array('data' => 'Del.', 'style' => 'width:80px')
$data['page_title'] = "Manage Job(s)";
$data['job_table_rows'] = $query->result();
$data['job_table'] = $this->table->generate($query);
/* $this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_manage', $data);
$this->load->view('users/view_footer_user', $data); */
$this->renderSecurePage('jobs/view_manage', $data);
}
+3 -94
View File
@@ -7,98 +7,7 @@
<span class="text-muted mt-1 fw-bold fs-7">0 Active Jobs</span>
</h3>
<div class="card-toolbar">
<!--begin::Menu-->
<button type="button" class="btn btn-sm btn-icon btn-color-primary btn-active-light-primary" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
<!--begin::Svg Icon | path: icons/duotune/general/gen024.svg-->
<span class="svg-icon svg-icon-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<rect x="5" y="5" width="5" height="5" rx="1" fill="#000000" />
<rect x="14" y="5" width="5" height="5" rx="1" fill="#000000" opacity="0.3" />
<rect x="5" y="14" width="5" height="5" rx="1" fill="#000000" opacity="0.3" />
<rect x="14" y="14" width="5" height="5" rx="1" fill="#000000" opacity="0.3" />
</g>
</svg>
</span>
<!--end::Svg Icon-->
</button>
<!--begin::Menu 1-->
<div class="menu menu-sub menu-sub-dropdown w-250px w-md-300px" data-kt-menu="true" id="kt_menu_61de1fee3df10">
<!--begin::Header-->
<div class="px-7 py-5">
<div class="fs-5 text-dark fw-bolder">Filter Options</div>
</div>
<!--end::Header-->
<!--begin::Menu separator-->
<div class="separator border-gray-200"></div>
<!--end::Menu separator-->
<!--begin::Form-->
<div class="px-7 py-5">
<!--begin::Input group-->
<div class="mb-10">
<!--begin::Label-->
<label class="form-label fw-bold">Status:</label>
<!--end::Label-->
<!--begin::Input-->
<div>
<select class="form-select form-select-solid" data-kt-select2="true" data-placeholder="Select option" data-dropdown-parent="#kt_menu_61de1fee3df10" data-allow-clear="true">
<option></option>
<option value="1">Approved</option>
<option value="2">Pending</option>
<option value="2">In Process</option>
<option value="2">Rejected</option>
</select>
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="mb-10">
<!--begin::Label-->
<label class="form-label fw-bold">Member Type:</label>
<!--end::Label-->
<!--begin::Options-->
<div class="d-flex">
<!--begin::Options-->
<label class="form-check form-check-sm form-check-custom form-check-solid me-5">
<input class="form-check-input" type="checkbox" value="1" />
<span class="form-check-label">Author</span>
</label>
<!--end::Options-->
<!--begin::Options-->
<label class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="2" checked="checked" />
<span class="form-check-label">Customer</span>
</label>
<!--end::Options-->
</div>
<!--end::Options-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="mb-10">
<!--begin::Label-->
<label class="form-label fw-bold">Notifications:</label>
<!--end::Label-->
<!--begin::Switch-->
<div class="form-check form-switch form-switch-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="" name="notifications" checked="checked" />
<label class="form-check-label">Enabled</label>
</div>
<!--end::Switch-->
</div>
<!--end::Input group-->
<!--begin::Actions-->
<div class="d-flex justify-content-end">
<button type="reset" class="btn btn-sm btn-light btn-active-light-primary me-2" data-kt-menu-dismiss="true">Reset</button>
<button type="submit" class="btn btn-sm btn-primary" data-kt-menu-dismiss="true">Apply</button>
</div>
<!--end::Actions-->
</div>
<!--end::Form-->
</div>
<!--end::Menu 1-->
<!--end::Menu-->
</div>
</div>
<!--end::Header-->
@@ -122,8 +31,8 @@
<!--end::Symbol-->
<!--begin::Text-->
<div class="d-flex flex-column">
<a href="/jobs/manage" class="text-dark text-hover-primary fs-6 fw-bolder">Jobs and Tasks</a>
<span class="text-muted fw-bold">0 Total Jobs</span>
<a href="/jobs/manage" class="tex,t-dark text-hover-primary fs-6 fw-bolder">Jobs and Tasks</a>
<span class="text-muted fw-bold"><?=$_SESSION['total_job_count']?> Total Job(s)</span>
</div>
<!--end::Text-->
</div>
+119 -117
View File
@@ -4,140 +4,142 @@
<div class="row g-5 g-xl-8">
<?php include('common/jobside.php'); ?>
<div class="col-xl-9">
<!--begin::Tables Widget 5-->
<div class="card card-xl-stretch mb-5 mb-xl-8">
<!--begin::Header-->
<div class="card-header border-0 pt-5">
<!-- h3 class="card-title align-items-start flex-column">
Create New Job
</h3 -->
<div class="card-toolbar">
<!--begin::Section-->
<div class="mb-17">
<!--begin::Content-->
<div class="d-flex flex-stack mb-5">
<div class="card mb-5 mb-xl-8">
<div class="card-header border-0 pt-5">
<h3 class="card-title align-items-start flex-column">
<span class="card-label fw-bolder fs-3 mb-1">Add New Job or Task</span>
<span class="text-muted mt-1 fw-bold fs-7">.</span>
</h3>
<div class="card-toolbar">
</div>
</div>
<div class="card-body py-3">
<div class="row">
<div class="col">
<!--begin::Item-->
<div class="d-flex align-items-center bg-light-info rounded p-5">
<!--begin::Icon-->
<span class="svg-icon svg-icon-warning me-5">
<!--begin::Svg Icon | path: icons/duotune/abstract/abs027.svg-->
<span class="svg-icon svg-icon-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path opacity="0.3" d="M21.25 18.525L13.05 21.825C12.35 22.125 11.65 22.125 10.95 21.825L2.75 18.525C1.75 18.125 1.75 16.725 2.75 16.325L4.04999 15.825L10.25 18.325C10.85 18.525 11.45 18.625 12.05 18.625C12.65 18.625 13.25 18.525 13.85 18.325L20.05 15.825L21.35 16.325C22.35 16.725 22.35 18.125 21.25 18.525ZM13.05 16.425L21.25 13.125C22.25 12.725 22.25 11.325 21.25 10.925L13.05 7.62502C12.35 7.32502 11.65 7.32502 10.95 7.62502L2.75 10.925C1.75 11.325 1.75 12.725 2.75 13.125L10.95 16.425C11.65 16.725 12.45 16.725 13.05 16.425Z" fill="black" />
<path d="M11.05 11.025L2.84998 7.725C1.84998 7.325 1.84998 5.925 2.84998 5.525L11.05 2.225C11.75 1.925 12.45 1.925 13.15 2.225L21.35 5.525C22.35 5.925 22.35 7.325 21.35 7.725L13.05 11.025C12.45 11.325 11.65 11.325 11.05 11.025Z" fill="black" />
</svg>
</span>
<!--end::Svg Icon-->
</span>
<!--end::Icon-->
<!--begin::Title-->
<h3 class="text-dark">Select a job template</h3>
<div class="flex-grow-1 me-2">
<a href="/jobs/create" class="fw-bolder text-gray-800 text-hover-primary fs-6">New Custom Job</a>
<span class="text-muted fw-bold d-block">Due in 2 Days</span>
</div>
<!--end::Title-->
<!--begin::Link-->
<a href="/jobs/create" class="fs-6 fw-bold link-primary">Create Custom Job</a>
<!--end::Link-->
<!--begin::Lable-->
<span class="fw-bolder text-warning py-1"></span>
<!--end::Lable-->
</div>
<!--end::Item-->
</div>
<!--end::Content-->
<!--begin::Separator-->
<div class="separator separator-dashed mb-9"></div>
<!--end::Separator-->
<!--begin::Row-->
<div class="row g-10">
<div class="col">
<!--begin::Item-->
<div class="d-flex align-items-center bg-light-info rounded p-5">
<!--begin::Icon-->
<span class="svg-icon svg-icon-warning me-5">
<!--begin::Svg Icon | path: icons/duotune/abstract/abs027.svg-->
<span class="svg-icon svg-icon-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path opacity="0.3" d="M21.25 18.525L13.05 21.825C12.35 22.125 11.65 22.125 10.95 21.825L2.75 18.525C1.75 18.125 1.75 16.725 2.75 16.325L4.04999 15.825L10.25 18.325C10.85 18.525 11.45 18.625 12.05 18.625C12.65 18.625 13.25 18.525 13.85 18.325L20.05 15.825L21.35 16.325C22.35 16.725 22.35 18.125 21.25 18.525ZM13.05 16.425L21.25 13.125C22.25 12.725 22.25 11.325 21.25 10.925L13.05 7.62502C12.35 7.32502 11.65 7.32502 10.95 7.62502L2.75 10.925C1.75 11.325 1.75 12.725 2.75 13.125L10.95 16.425C11.65 16.725 12.45 16.725 13.05 16.425Z" fill="black" />
<path d="M11.05 11.025L2.84998 7.725C1.84998 7.325 1.84998 5.925 2.84998 5.525L11.05 2.225C11.75 1.925 12.45 1.925 13.15 2.225L21.35 5.525C22.35 5.925 22.35 7.325 21.35 7.725L13.05 11.025C12.45 11.325 11.65 11.325 11.05 11.025Z" fill="black" />
</svg>
</span>
<!--end::Svg Icon-->
</span>
<!--end::Icon-->
<!--begin::Title-->
<div class="flex-grow-1 me-2">
<a href="/jobs/create" class="fw-bolder text-gray-800 text-hover-primary fs-6">Add Repeating Job</a>
<span class="text-muted fw-bold d-block">Due in 2 Days</span>
</div>
<!--end::Title-->
<!--begin::Lable-->
<span class="fw-bolder text-warning py-1"></span>
<!--end::Lable-->
</div>
<!--end::Item-->
</div>
</div>
</div>
</div>
<div class="card">
<!--begin::Header-->
<div class="card-header border-0 pt-5">
<h3 class="card-title align-items-start flex-column">
<span class="card-label fw-bolder fs-3 mb-1">Job Templates</span>
<span class="text-muted mt-1 fw-bold fs-7">.</span>
</h3>
<div class="card-toolbar">
</div>
</div>
<!--end::Header-->
<!--begin::Body-->
<div class="card-body py-3">
<!--begin::Table container-->
<div class="table-responsive">
<!--begin::Table-->
<table class="table align-middle gs-0 gy-4">
<!--begin::Table body-->
<tbody>
<?php
foreach($template_data as $tdata){
foreach($template_data as $row){
// var_dump( $row );
?>
<!--begin::Col-->
<div class="col-md-4">
<!--begin::Hot sales post-->
<div class="card-xl-stretch me-md-6" style="background-color:aliceblue">
<!--begin::Overlay-->
<!--begin::Image-->
<div class="overlay-wrapper bgi-no-repeat bgi-position-center bgi-size-cover card-rounded min-h-175px" style="background-image:url('<?=$tdata['img']?>')"></div>
<!--end::Image-->
<!--end::Overlay-->
<!--begin::Body-->
<div class="mt-5">
<!--begin::Title-->
<div class="fs-4 text-dark fw-bolder text-hover-primary text-dark lh-base"><?=$tdata['name']?></div>
<!--end::Title-->
<!--begin::Text-->
<div class="fw-bold fs-5 text-gray-600 text-dark mt-3"><?=$tdata['description']?></div>
<!--end::Text-->
<!--begin::Text-->
<div class="fs-6 fw-bolder mt-5 d-flex flex-stack">
<!--begin::Label-->
<span class="badge border border-dashed fs-2 fw-bolder text-dark p-2">
<span class="fs-6 fw-bold text-gray-400">estimate-<?=$tdata['timeline_days']?> days</span></span>
<!--end::Label-->
<!--begin::Action-->
<a href="/jobs/create/<?=$tdata['ID']?>" class="btn btn-sm btn-primary">Continue</a>
<!--end::Action-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="symbol symbol-50px me-5">
<span class="symbol-label bg-light">
<img src="<?=$row['img']?>" class="h-75 align-self-end" alt="" />
</span>
</div>
<div class="d-flex justify-content-start flex-column">
<a href="#" onclick="return post_nav_find_action('/jobs/processjob',<?=$row['ID']?> )"
class="text-dark fw-bolder text-hover-primary mb-1 fs-6"><?=$row['name']?></a>
<span class="text-muted fw-bold text-muted d-block fs-7"><?=$row['description']?></span>
</div>
<!--end::Text-->
</div>
<!--end::Body-->
</div>
<!--end::Hot sales post-->
</div>
<!--end::Col-->
</td>
<td class="text-end">
<a href="/jobs/create/<?=$row['ID']?>" class="btn btn-bg-light btn-color-muted btn-active-color-primary btn-sm px-4 me-2">Start</a>
</td>
</tr>
<?php
}
?>
<!--begin::Col-->
<div class="col-md-4">
<!--begin::Hot sales post-->
<div class="card-xl-stretch ms-md-6">
<!--begin::Overlay-->
<!--begin::Image-->
<div class="overlay-wrapper bgi-no-repeat bgi-position-center bgi-size-cover card-rounded min-h-175px" style="background-image:url('/site3/assets/media/jobs/custom_job.jpg')"></div>
<!--end::Image-->
<!--end::Overlay-->
<!--begin::Body-->
<div class="mt-5">
<!--begin::Title-->
<a href="/jobs/create" class="fs-4 text-dark fw-bolder text-hover-primary text-dark lh-base">simply Create any type of job you wanted</a>
<!--end::Title-->
<!--begin::Text-->
<div class="fw-bold fs-5 text-gray-600 text-dark mt-3">Weve been focused on making a the from also not been eye</div>
<!--end::Text-->
<!--begin::Text-->
<div class="fs-6 fw-bolder mt-5 d-flex flex-stack">
<!--begin::Label-->
<span class="badge border border-dashed fs-2 fw-bolder text-dark p-2">
<span class="fs-6 fw-bold text-gray-400">.</span></span>
<!--end::Label-->
<!--begin::Action-->
<a href="/jobs/create" class="btn btn-sm btn-primary">Continue</a>
<!--end::Action-->
</div>
<!--end::Text-->
</div>
<!--end::Body-->
</div>
<!--end::Hot sales post-->
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</tbody>
<!--end::Table body-->
</table>
<!--end::Table-->
</div>
<!--end::Section-->
</div>
</div>
<!--end::Header-->
<!--begin::Body-->
<div class="card-body py-3">
<div class="tab-content">
</div>
</div>
<!--end::Body-->
</div>
<!--end::Tables Widget 5-->
</div>
</div>
<!--end::Row-->