public function post_job($data) { $user_id = $this->session->userdata('user_id'); $data = array('title' => $this->input->post('title'), 'position' => $this->input->post('position'), 'openings' => $this->input->post('openings'), 'location' => $this->input->post('location'), 'qualification' => $this->input->post('qualification'), 'experience' => $this->input->post('experience'), 'salary' => $this->input->post('salary'), 'category_id' => $this->input->post('category_id'), 'job_description' => $this->input->post('job_description'), 'requirements' => $this->input->post('requirements'), 'facilities' => $this->input->post('facilities'), 'additional_info' => $this->input->post('additional_info'), 'published_date' => get_local_time('published_date'), 'deadline_date' => $this->input->post('deadline_date'), 'application_procedure' => $data, 'user_id' => $user_id, 'status' => 1); if ($this->db->insert('tbl_jobs', $data)) { return true; } else { return false; } }
<td> <font face="arial" size="2"><b>Pixels</b></font> </td> </tr> <?php require_once "include/ads.inc.php"; //require ('include/mouseover_js.inc.php'); $sql = "SELECT *, MAX(order_date) as max_date, sum(quantity) AS pixels FROM orders where status='completed' AND banner_id='{$BID}' GROUP BY user_id, banner_id order by pixels desc "; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { ?> <tr bgcolor="#ffffff" > <td> <font face="arial" size="2"><?php echo get_formatted_date(get_local_time($row[max_date])); ?> </font> </td> <td> <font face="arial" size="2"><?php $sql = "Select * FROM `ads` as t1, `orders` AS t2 WHERE t1.ad_id=t2.ad_id AND t1.banner_id='{$BID}' and t1.order_id > 0 AND t1.user_id='" . $row['user_id'] . "' ORDER BY `ad_date`"; $m_result = mysql_query($sql) or die(mysql_error()); while ($prams = mysql_fetch_array($m_result, MYSQL_ASSOC)) { $ALT_TEXT = get_template_value('ALT_TEXT', 1); $ALT_TEXT = str_replace("'", "", $ALT_TEXT); $ALT_TEXT = str_replace("\"", '', $ALT_TEXT); $js_str = " onmousemove=\"sB(event, '" . $ALT_TEXT . "', this, " . $prams['ad_id'] . ")\" onmouseout=\"hI()\" "; echo $br . '<a target="_blank" ' . $js_str . ' href="' . get_template_value('URL', 1) . '">' . get_template_value('ALT_TEXT', 1) . '</a>'; $br = '<br>'; }
?> </p> <table border="1"> <tr> <td><b>Date</b></td> <td><b>Clicks</b></td> </tr> <?php if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { ?> <tr> <td><?php echo get_local_time($row['date']); ?> </td> <td><?php echo $row['CLICKSUM']; ?> </td> </tr> <?php $total = $total + $row['CLICKSUM']; } } ?>
$i++; ?> <tr onmouseover="old_bg=this.getAttribute('bgcolor');this.setAttribute('bgcolor', '#FBFDDB', 0);" onmouseout="this.setAttribute('bgcolor', old_bg, 0);" bgColor="<?php if ($_REQUEST[order_id] == $row[order_id]) { echo '#FFFF99'; } else { echo '#ffffff'; } ?> "> <td><input type="checkbox" name="orders[]" value="<?php echo $row[order_id]; ?> "></td> <td><font face="Arial" size="2"><?php echo get_local_time($row[order_date]); ?> </font></td> <td><font face="Arial" size="2"><?php echo escape_html($row[FirstName] . " " . $row[LastName]); ?> </font></td> <td><font face="Arial" size="2"><?php echo $row[Username]; ?> (<a href='edit.php?user_id=<?php echo $row['ID']; ?> '>#<?php echo $row[ID]; ?>
<td><b><font size="2">Status</b></font></td> <td><b><font size="2">Err</b></font></td> <td><b><font size="2">Retry</b></font></td> <td><b><font size="2">Action</b></font></td> </tr> <?php $i = 0; while (($row = mysql_fetch_array($result)) && $i < $records_per_page) { $i++; $new_window = "onclick=\"window.open('show_email.php?mail_id=" . $row[mail_id] . "', '', 'toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=yes,resizable=1,width=600,height=600,left = 50,top = 50');return false;\""; ?> <tr bgColor="#ffffff"> <td><font size="1"><?php echo get_local_time($row['mail_date']); ?> </font></td> <td><font size="1"><?php echo $row['template_id']; ?> </font></td> <td><font size="1"><?php echo $row['to_address']; ?> </font></td> <td><font size="1"><?php echo $row['to_name']; ?> </font></td> <td><font size="1"><?php
function register($user_type, $image = '', $activation_code) { $data = array('f_name' => $this->input->post('f_name'), 'l_name' => $this->input->post('l_name'), 'password' => $this->helper_model->encrypt_me($this->input->post('password')), 'email' => $this->input->post('email'), 'gender' => $this->input->post('gender'), 'dob_estd' => $this->input->post('dob_estd'), 'email' => $this->input->post('email'), 'address' => $this->input->post('address'), 'marital_status' => $this->input->post('marital_status'), 'phone' => $this->input->post('phone'), 'user_type' => $user_type, 'newsletter_subscription' => $this->input->post('newsletter_subscription'), 'verification_status' => 0, 'image' => $image, 'reg_date' => get_local_time('time'), 'activation_reset_key' => $activation_code); $this->db->insert('tbl_users', $data); return $this->db->insert_id(); }
function echo_ad_list_data($admin) { global $column_list, $column_info, $label, $cur_offset, $order_str, $q_offset, $show_emp, $cat, $list_mode; if ($_REQUEST['order_by'] != '') { $ord = $_REQUEST['ord']; if ($ord == 'asc') { $ord = 'desc'; } elseif ($ord == 'desc') { $ord = 'asc'; } else { $ord = 'desc'; } $order_str = "&order_by=" . $_REQUEST['order_by'] . "&ord=" . $ord; } foreach ($column_list as $template_tag) { $val = get_template_value($template_tag, 1, $admin); //$val = $val.$template_tag; if ($column_info[$template_tag]['admin'] == 'Y' && !$admin) { continue; // do not render this column } if ($column_info[$template_tag]['trunc'] > 0) { $val = truncate_html_str($val, $column_info[$template_tag]['trunc'], $trunc_str_len); } // process the value depending on what kind of template tag it was given. if ($template_tag == 'DATE') { $init_date = strtotime(trim_date($val) . " GMT"); // the last date modified $dst_date = strtotime(trim_date(gmdate("r")) . " GMT"); // now if (!$init_date) { $days = "x"; } else { $diff = $dst_date - $init_date; $days = floor($diff / 60 / 60 / 24); } //echo $days; $FORMATTED_DATE = get_formatted_date(get_local_time($val)); $val = $FORMATTED_DATE . "<br>"; if ($days == 0) { $val = $val . '<span class="today"><b>' . $label["ads_list_today"] . '</span>'; } elseif ($days > 0 && $days < 2) { $val = $val . '<span class="days_ago">' . $days . " " . $label["ads_list_day_ago"] . "</span>"; } elseif ($days > 1 && $days < 8) { $val = $val . '<span class="days_ago">' . $days . " " . $label["ads_list_days_ago"] . "</span>"; } elseif ($days >= 8) { $val = $val . '<span class="days_ago2">' . $days . " " . $label["ads_list_days_ago"] . "</span>"; } } if ($column_info[$template_tag]['is_bold'] == 'Y') { $b1 = "<b>"; $b2 = "</b>"; } else { $b1 = ''; $b2 = ''; } if ($column_info[$template_tag]['clean'] == 'Y') { // fix up punctuation spacing $val = preg_replace('/ *(,|\\.|\\?|!|\\/|\\\\) */i', '$1 ', $val); } if ($column_info[$template_tag]['link'] == 'Y') { // Render as a Link to the record? $AD_ID = get_template_value('AD_ID', 1, $admin); $val = '<a href="' . htmlentities($_SERVER['PHP_SELF']) . '?ad_id=' . $AD_ID . '&offset=' . $cur_offset . $order_str . $q_string . '"'; /// IMAGE PREVIEW MOUSEOVER Code // Note: to have this feature working, you must have a template tag called 'IMAGE' defined in the resume form define('PREVIEW_AD', 'YES'); if (PREVIEW_AD == 'YES') { $ALT_TEXT = get_template_value('ALT_TEXT', 1, $admin); //$AD_ID = get_template_value ('AD_ID', 1, $admin); $js_str = " onmousemove=\"sB(event,'" . htmlspecialchars(str_replace("'", "\\'", $ALT_TEXT)) . "',this, " . $AD_ID . ")\" onmouseout=\"hI()\" "; $val = $val . $js_str; } $val = $val . '>' . get_template_value($template_tag, 1, $admin) . "</a>"; } ?> <td class="list_data_cell" <?php if ($column_info[$template_tag]['no_wrap'] == 'Y') { echo ' nowrap '; } ?> > <?php echo $b1 . $val . $b2; ?> </td> <?php } }
function get_template_value($tmpl, $form_id) { global $subscr_block_status; // subscription status global $prams; //global $tag_to_field_id; $tag_to_field_id = get_tag_to_field_id($form_id); //print_r($tag_to_field_id); if (func_num_args() > 2) { $admin = func_get_arg(2); } //AD_ID [AD_ID] $field_id = $tag_to_field_id[$tmpl]['field_id']; $val = $prams[$field_id]; switch ($tag_to_field_id[$tmpl]['field_type']) { case "CATEGORY": $val = getCatName($val); break; case "RADIO": $val = getCodeDescription($field_id, $val); break; case "SELECT": $val = getCodeDescription($field_id, $val); break; case "MSELECT": case "CHECK": $vals = explode(",", $val); foreach ($vals as $v) { $str .= $comma . getCodeDescription($field_id, $v); $comma = ", "; //echo $str; } $val = $str; break; case "DATE": case "DATE_CAL": if ($val != '0000-00-00 00:00:00') { $val = get_local_time($val . " GMT"); $val = get_formatted_date($val); } else { $val = ''; } break; case "SKILL_MATRIX": $sql = "SELECT name FROM skill_matrix_data where object_id='" . $prams['resume_id'] . "' "; $result = mysql_query($sql) or die(mysql_error()); $val = ''; while ($row = mysql_fetch_array($result)) { $val .= $comma . $row['name']; $comma = ", "; } break; case "TIME": $val = get_local_time($val . " GMT"); // the time is always stored as GMT break; case "TEXT": $val = str_replace("<", "<", $val); // block html tags in text fields $val = str_replace(">", ">", $val); //$val = htmlentities($val); break; } //$val = print_r ($tag_to_field_id); global $label; if ($field_id == '') { echo '<b>Configuration error: Failed to bind the "' . $tmpl . '" Template Tag. (not defined)</b> <br> '; } return $val; }
echo $row[ID]; ?> " name="Edit"><?php echo $row[Username]; ?> </a></font></td> <td><font face="Arial" size="2"><?php echo $row[Email]; ?> </font></td> <td><font face="Arial" size="1"><?php echo $row[CompName]; ?> </font></td> <td><font face="Arial" size="1"><?php echo get_local_time($row[SignupDate]); ?> </font></td> <td><font face="Arial" size="2"><?php if ($row[Validated] == 1) { echo "Yes"; } else { echo "No"; } if ($row[Rank] == 2) { echo " <b>Privileged</b>"; } ?> </font></td> <td><font face="Arial" size="1"><?php echo $row[IP];