public function addeditBanner($Data, $id) { if ($id == 0) { $fields = 'title'; $_POST['md_title'] = htmlentities($_POST['md_title'], ENT_QUOTES); $_POST['md_description'] = htmlentities($_POST['md_description'], ENT_QUOTES); if ($_FILES['db_background']['name'] != '') { $fileName = removeUnsed($_FILES['db_background']['name']); move_uploaded_file($_FILES['db_background']['tmp_name'], UPLOAD_ROOT_PATH . $fileName); $FileNameArray = pathinfo('upload/' . $fileName); mpeg2flv('upload/' . $fileName, $FileNameArray['filename']); $_POST['db_background'] = $fileName; $fields .= ', background'; //$fieldValues .=",'".htmlspecialchars($_POST['db_background'],ENT_QUOTES)."'"; $_POST['db_background'] = htmlentities($_POST['db_background'], ENT_QUOTES); } } else { if (isset($_POST['video_name'])) { $_POST['db_background'] = $_POST['video_name']; } } $query = $this->db->query("select title from tbl_banner where id!=" . $id . " and title='" . $Data['md_title'] . "'"); $RsCount = $query->result_array(); if (count($RsCount) == 0) { if ($id == 0) { $this->insertFormContent(); } else { $this->updateFormContent($id); } return $id; } else { return 0; } }
echo $profileRow->id; ?> " data-prourl="<?php echo str_replace(' ', '', stripslashes(html_entity_decode($profileRow->title, ENT_QUOTES))); ?> " data-body="<?php echo stripslashes(htmlentities($profileRow->description, ENT_QUOTES)); ?> " data-image="<?php echo base_url() . 'library/upload/' . $profileImage; ?> " title="<?php echo stripslashes(html_entity_decode($profileRow->title, ENT_QUOTES)); ?> " class="post-thumb-video <?php echo removeUnsed($regionName); ?> imageclick recimg"><?php if (!empty($profileImage)) { ?> <img src="<?php echo base_url() . 'library/upload/' . $profileImage; ?> " width="300" height="250" class="post-img lazy"><?php } else { ?> <img src="<?php echo base_url() . 'images/blankImg.jpg'; ?> " width="100%" class="post-img lazy"><?php }
public function event_getprofile($svalue) { $data = '0'; $strSql = "SELECT title,image,description,region_id FROM `tbl_profiles` WHERE (`title` LIKE '%" . stripslashes($svalue) . "%' OR \n\t\t\t\t\t\t\t\t\t\t`tags` LIKE '%" . stripslashes($svalue) . "%' OR `category` LIKE '%" . stripslashes($svalue) . "%' OR \n\t\t\t\t\t\t\t\t\t\t`kind` LIKE '%" . stripslashes($svalue) . "%') AND status='4'"; $sql = $this->db->query($strSql); $ArrRs = $sql->result_array(); if (count($ArrRs) > 0) { $data = ""; foreach ($ArrRs as $key => $profile) { $strSql2 = "Select distinct region_name FROM tbl_regions where region_name!='' and status=1 and id in (" . $profile['region_id'] . ")"; $sql2 = $this->db->query($strSql2); $ArrRs2 = $sql2->result_array(); if (count($ArrRs2) > 0) { $regOb = $ArrRs2[0]; $regionName = $regOb['region_name']; if ($profile['title'] != '') { $data .= ' <li><a data-postid="' . removeUnsed($regionName) . '" href="#' . $removeUnsed($regionName) . '-profile" data-title="' . utf8_encode(stripslashes($profile['title'])) . '" data-body="' . utf8_encode(stripslashes($profile['description'])) . '" data-image="show-thumb.php?file=upload/' . $profile['image'] . '&w=500&h=500" title="' . utf8_encode(stripslashes($profile['title'])) . '" class="post-thumb-video ' . $removeUnsed($regionName) . ' imageclick recimg"><img src="show-thumb.php?file=upload/' . $profile['image'] . '&w=50&h=50" width="50" height="50" /> ' . utf8_encode(stripslashes($profile['title'])) . '</a></li>'; } } } } return $data; }