Пример #1
0
 function lostpasswd()
 {
     $this->load->library('form_validation');
     $this->load->helper('form');
     $this->load->library('encrypt');
     $this->load->helper('string');
     $this->load->model('Adminmodel');
     $this->load->library('parser');
     $this->load->library('email');
     $this->security->init_csrf();
     $this->security->csrf_verify();
     //validation check
     $this->form_validation->set_rules('username', 'Username', 'trim|required|callback_username_check');
     $this->form_validation->set_error_delimiters('<li>', '</li>');
     if ($this->form_validation->run() == FALSE) {
         $inner = array();
         $page = array();
         $page['content'] = $this->load->view('user/lostpasswd-form', $inner, TRUE);
         $this->load->view($this->shellFile, $page);
     } else {
         $this->Adminmodel->issuePassword($this->input->post('username', TRUE));
         header("location: " . base_url() . createUrl("welcome/password_sent/"));
         exit;
     }
 }
function transformCategoryToUrl($categories, $action, $main = false)
{
    foreach ($categories as $categoryName) {
        if (isset($categoryName['category_name'], $categoryName['category_id'])) {
            $urlCategories[] = explode('/', createUrl(array($categoryName['category_name'], $categoryName['category_id'])));
        } else {
            $urlCategories[] = explode('/', createUrl(array($categoryName['subcategory_name'], $categoryName['subcategory_id'])));
        }
    }
    foreach ($urlCategories as $key => $a) {
        if (in_array($action, $a)) {
            $exists = true;
            if (isset($categories[$key]['category_name']) && $main == false) {
                $name = $categories[$key]['category_name'];
            } else {
                $name = $categories[$key]['subcategory_name'];
            }
            if (isset($categories[$key]['category_id']) && $main == false) {
                $index = $categories[$key]['category_id'];
            } else {
                $index = $categories[$key]['subcategory_id'];
            }
            break;
        } else {
            $index = false;
            $name = false;
            $exists = false;
        }
    }
    $result['exists'] = $exists;
    $result['existingIndex'] = $index;
    $result['category_name'] = $name;
    return $result;
}
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($id)
 {
     $this->customerData = Customer::model()->findByPk($id);
     $model = MagicSpool::model()->findByAttributes(array('cus_id' => getCurCusId()));
     $magic_model = new MagicSpoonOptions();
     if (!$model) {
         $model = new MagicSpool();
         $magic_model = new MagicSpoonOptions();
     }
     DynamicCall::GetEdit1stPdf(getCurCusId());
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['MagicSpool'])) {
         $model->attributes = $_POST['MagicSpool'];
         $model->one = $_POST['MagicSpool']['one'];
         $model->two = $_POST['MagicSpool']['two'];
         $model->three = $_POST['MagicSpool']['three'];
         $model->four = $_POST['MagicSpool']['four'];
         if (Yii::app()->user->isUser()) {
             $model->cus_id = $id;
         }
         if ($model->save()) {
             //                if (Yii::app()->user->isUser()):
             $this->redirect(createUrl('site/menu', array('id' => $id)));
             //                endif;
             //                $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model, 'magic_model' => $magic_model));
 }
Пример #4
0
 public function init()
 {
     if (!is_array($this->items)) {
         throw new CException('Wrong options format. Look widget php-doc for help.');
     }
     $this->items = array(_('Головна') => createUrl('site/index')) + $this->items;
 }
function getAllProductsByCategory($id, $db)
{
    $stmt = $db->prepare('SELECT ' . 'product_has_category.product_id, ' . 'product_has_category.category_id, ' . 'product_has_subcategory.subcategory_id, ' . 'categories.category_name, ' . 'subcategories.subcategory_name, ' . 'products.product_id, ' . 'products.product_name, ' . 'products.product_description, ' . 'products.product_google_description, ' . 'products.product_image_path, ' . 'products.product_start, ' . 'products.product_end, ' . 'products.product_valence, ' . 'products.product_brand, ' . 'package_has_products.user_has_package_id, ' . 'user_has_packages.package_start, ' . 'user_has_packages.package_end, ' . 'user_has_products.user_id, ' . 'user_has_contacts.contact_id, ' . 'contacts.contact_name, ' . 'contacts.contact_homepage, ' . 'contacts.contact_street, ' . 'contacts.contact_zip, ' . 'contacts.contact_city, ' . 'contacts.contact_latitude, ' . 'contacts.contact_longitude, ' . 'contacts.contact_phone, ' . 'contacts.contact_logo_path, ' . 'contacts.contact_mail, ' . 'products.product_price ' . 'FROM product_has_category ' . 'LEFT JOIN products ON product_has_category.product_id = products.product_id ' . 'LEFT JOIN package_has_products ON package_has_products.product_id = products.product_id ' . 'LEFT JOIN user_has_packages ON user_has_packages.user_has_package_id = package_has_products.user_has_package_id ' . 'LEFT JOIN product_has_subcategory ON product_has_subcategory.product_id = products.product_id ' . 'LEFT JOIN subcategories ON subcategories.subcategory_id = product_has_subcategory.subcategory_id ' . 'LEFT JOIN categories ON categories.category_id = product_has_category.category_id ' . 'LEFT JOIN user_has_products ON user_has_products.product_id = products.product_id ' . 'LEFT JOIN user_has_contacts ON user_has_contacts.user_id = user_has_products.user_id ' . 'LEFT JOIN contacts ON contacts.contact_id = user_has_contacts.contact_id ' . 'WHERE product_has_category.category_id = ' . $id . ' ' . 'AND products.product_status = 1');
    if ($stmt !== false) {
        $stmt->execute();
        $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
        foreach ($result as $key => $res) {
            $name = createUrl(array($res['product_name']));
            $name = str_replace(' ', '-', $name);
            $name = explode('/', $name);
            $result[$key]['url_string'] = $name[1];
            $dateStart = explode(' ', $res['product_start']);
            $dateEnd = explode(' ', $res['product_end']);
            $dateStart[0] = explode('-', $dateStart[0]);
            $dateStart[1] = explode(':', $dateStart[1]);
            $dateEnd[0] = explode('-', $dateEnd[0]);
            $dateEnd[1] = explode(':', $dateEnd[1]);
            $stmpStart = mktime($dateStart[1][0], $dateStart[1][1], $dateStart[1][2], $dateStart[0][1], $dateStart[0][2], $dateStart[0][0]);
            $stmpEnd = mktime($dateEnd[1][0], $dateEnd[1][1], $dateEnd[1][2], $dateEnd[0][1], $dateEnd[0][2], $dateEnd[0][0]);
            $result[$key]['product_timestamp_start'] = $stmpStart;
            $result[$key]['product_timestamp_end'] = $stmpEnd;
        }
        if (!empty($result)) {
            return $result;
        } else {
            return false;
        }
    }
    return false;
}
Пример #6
0
function dynamicRedirect($path, $params = [], $getParamsKeys = [])
{
    //If user has specified a custom path for redirection
    //If ref is set at current page, you know where you should redirect
    if (isset($_GET['red'])) {
        switch ($_GET['red']) {
            case 'add_book':
                $getParamsKeys[] = 'authors';
                $path = createUrl('add_book.php', $params, $getParamsKeys);
                break;
            case 'add_book_cp':
                $getParamsKeys[] = 'bid';
                $path = createUrl('add_book_cp.php', $params, $getParamsKeys);
                break;
            case 'profile':
                array_push($getParamsKeys, 'uid');
                $path = createUrl('profiler.php', $params, $getParamsKeys);
                break;
            case 'request':
                $getParamsKeys[] = 'bcid';
                $path = createUrl('request.php', $params, $getParamsKeys);
                break;
            case 'activity':
                $path = createUrl('activity.php', $params, $getParamsKeys);
                break;
            default:
                $path = createUrl($path, $params, $getParamsKeys);
        }
        header('Location: ' . $path);
        die;
    }
    $path = createUrl($path, $params, $getParamsKeys);
    header('Location: ' . $path);
    die;
}
Пример #7
0
 function delete($id = null)
 {
     if (!$id) {
         return false;
     }
     $this->commonmodel->delete($id, 'franchise_testimonials');
     redirect(createUrl('frontend/testimonials'));
 }
Пример #8
0
 function delete($id = null)
 {
     if (!$id) {
         return false;
     }
     $this->commonmodel->delete($id, 'front_events');
     redirect(createUrl('frontend/sideEventsLinks'));
 }
Пример #9
0
function createMenuItem($pageNumber, $title)
{
    $isActiveClass = isset($_GET['page']) && $_GET['page'] == 'page_' . $pageNumber ? ' current-menu-item ' : '';
    $currentUrl = createUrl($pageNumber);
    $menuItem = '<div class="menu-item ' . $isActiveClass . '">';
    $menuItem .= '<a href="' . $currentUrl . '" class="menu-anchor">' . $title . '</a>';
    $menuItem .= '</div>';
    echo $menuItem;
}
/**
 * Creates an jsTree json array for the given tag
 *
 * @param string  $tag         Tag name
 * @param boolean $hasChildren If the tag has subtags (children) or not.
 *                             If unsure, set it to "true".
 *
 * @return array Array to be sent back to the browser as json
 */
function createTagArray($tag, $hasChildren = true)
{
    $ar = array('data' => array('title' => $tag, 'attr' => array('href' => createUrl('tags', $tag))), 'attr' => array('rel' => $tag));
    if ($hasChildren) {
        //jstree needs that to show the arrows
        $ar['state'] = 'closed';
    }
    return $ar;
}
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($id)
 {
     $curUser = Customer::model()->findByPk($id);
     $this->customerData = $curUser;
     if (empty($curUser->id)) {
         throw new CHttpException(403, 'Customer Does\'t exists');
     }
     // saving current customer to session
     Yii::app()->session['last_created_user'] = $curUser->attributes;
     //$curUser->selectedCategories;
     $model = WorkingWell::model()->findByAttributes(array('cus_id' => $id));
     $working_model = new WorkingWellOptions();
     if (!$model) {
         $model = new WorkingWell();
         $working_model = new WorkingWellOptions();
     }
     if (isset($_GET['editpdf'])) {
         setCurCus($id);
         DynamicCall::SetEdit1stPdf(getCurCusId());
         DynamicCall::loadProducts(getCurCusId());
         //            DynamicCall::loadMenu(getCurCusId());
         $cusApp = CustAppoint::model()->findByAttributes(array('cus_id' => getCurCusId(), 'app_id' => 2));
         if ($cusApp) {
             $cusApp->status = 1;
             $cusApp->save();
         }
     }
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['WorkingWell'])) {
         $model->attributes = $_POST['WorkingWell'];
         $model->one = $_POST['WorkingWell']['one'];
         $model->two = $_POST['WorkingWell']['two'];
         $model->three = $_POST['WorkingWell']['three'];
         $model->four = $_POST['WorkingWell']['four'];
         if (Yii::app()->user->isUser()) {
             $model->cus_id = $id;
         }
         if ($model->save()) {
             //                if (Yii::app()->user->isUser()):
             $this->redirect(createUrl('MagicSpool/create', array('id' => $id)));
             //                endif;
             //                $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model, 'working_model' => $working_model));
 }
Пример #12
0
 function reply($offset = false)
 {
     if (!$offset) {
         redirect('user/messages');
         return false;
     }
     $this->form_validation->set_rules('message', 'Message', 'trim|required');
     if ($this->form_validation->run() == FALSE) {
         $messages = $this->messagemodel->getMessagesByUserId($offset);
         $inner['allMessages'] = $messages;
         $page['content'] = $this->load->view('reply', $inner, TRUE);
         $this->load->view($this->default, $page);
     } else {
         $messages = $this->messagemodel->addReply($offset);
         $this->session->set_flashdata('SUCCESS', 'message_deleted');
         redirect(createUrl('user/messages/reply/' . $offset));
     }
 }
Пример #13
0
 static function nav($clearget = true)
 {
     $text = (include __DIR__ . '/language/' . Core::$LANGUAGE['lang'] . '.php');
     $nav = '<ul class="pagination">';
     if (self::$curpage - self::$options['move'] > 1 && self::$options['begin']) {
         if (self::$options['begin']) {
             $nav .= '<li><a href="' . createUrl(['page' => 1], $clearget) . '">' . $text['begin'] . '</a></li>';
         }
         if (self::$options['before']) {
             $nav .= '<li><a href="' . createUrl(['page' => self::$curpage - self::$options['move'] - 1], $clearget) . '">' . $text['before'] . '</a></li>';
         }
         if (self::$options['trash']) {
             $nav .= '<li><span>...</span></li>';
         }
     }
     for ($i = self::$curpage - self::$options['move']; $i <= self::$curpage + self::$options['move']; ++$i) {
         if ($i == self::$curpage) {
             $nav .= '<li class="active"><span>' . self::$curpage . '</span></li>';
         } elseif ($i > 0 && $i <= self::$pages) {
             $nav .= '<li><a href="' . createUrl(['page' => $i], $clearget) . '">' . $i . '</a></li>';
         }
     }
     if (self::$curpage - 1 > 0 && empty(Core::$META['prev'])) {
         Core::$META['prev'] = createUrl(['page' => self::$curpage - 1], $clearget);
     }
     if (self::$curpage + 1 <= self::$pages && empty(Core::$META['next'])) {
         Core::$META['next'] = createUrl(['page' => self::$curpage + 1], $clearget);
     }
     if (self::$curpage + self::$options['move'] < self::$pages) {
         if (self::$options['trash']) {
             $nav .= '<li><span>...</span></li>';
         }
         if (self::$options['next']) {
             $nav .= '<li><a href="' . createUrl(['page' => self::$curpage + self::$options['move'] + 1], $clearget) . '">' . $text['next'] . '</a></li>';
         }
         if (self::$options['end']) {
             $nav .= '<li><a href="' . createUrl(['page' => self::$pages], $clearget) . '">' . $text['end'] . '</a></li>';
         }
     }
     $nav .= '</ul>';
     return $nav;
 }
function transformProductNameToUrl($products, $action)
{
    foreach ($products as $product) {
        $urlProducts[] = explode('/', str_replace(' ', '-', createUrl(array($product['product_name'], $product['product_id']))));
    }
    foreach ($urlProducts as $key => $a) {
        if (in_array($action, $a)) {
            $exists = true;
            $name = $products[$key]['product_name'];
            $index = $key;
            break;
        } else {
            $index = false;
            $name = false;
            $exists = false;
        }
    }
    $result['exists'] = $exists;
    $result['existingIndex'] = $index;
    $result['product_name'] = $name;
    return $result;
}
 function index()
 {
     $allUrls = array();
     $otherPages = array("classified/search", "contactus", "contactus-m", "about", "how-to-use", "terms-and-condition", "privacy-policy", "about-m", "how-to-use-m", "terms-and-condition-m", "privacy-policy-m");
     foreach ($otherPages as $page) {
         $crDate = date("Y-m-d", strtotime('-3 day'));
         $allUrls[] = array("loc" => $page, "priority" => "0.8", "lastmod" => $crDate);
     }
     $categories = $this->common_model->getCategoryArray();
     $cities = getCities();
     foreach ($categories as $cat) {
         foreach ($cities as $city) {
             $allUrls[] = array("loc" => "search/" . $cat['cat_slug'] . "/" . urlencode($city->city_name), "priority" => "0.8", "lastmod" => $crDate);
         }
     }
     /*
     		$categories = $this->common_model->getCategoryOrderedArray();
     		foreach ($categories as $category)
     		{
     			$crDate	= date("Y-m-d",strtotime('-1 day'));
     			$allUrls[] = array("loc"=>createUrl("category",array($category['category']['cat_id'],$category['category']['cat_name'])),"priority"=>"0.8","lastmod"=>$crDate);
     			if (isset($category["children"]))
     			{
     				foreach ($category["children"] as $cat)
     				{
     					$allUrls[] = array("loc"=>"classified/search?category=".urlencode($category['category']['cat_id']."-".@$cat['category']['cat_id']."-"),"priority"=>"0.8","lastmod"=>$crDate);
     				}
     			}
     		}*/
     $classifieds = $this->common_model->selectData(CLASSIFIEDAD, "clad_id,clad_title,clad_modified_date", array("clad_active" => 1, "clad_expiry_date >=" => date('Y-m-d H:i:s')), "clad_modified_date", "DESC");
     foreach ($classifieds as $classified) {
         $time = date("Y-m-d", strtotime($classified->clad_modified_date));
         $crDate = $time;
         $allUrls[] = array("loc" => createUrl("detail", array($classified->clad_id, $classified->clad_title)), "priority" => "0.8", "lastmod" => $crDate);
     }
     $data['urls'] = $allUrls;
     header("Content-Type: text/xml;charset=iso-8859-1");
     $this->load->view("sitemap", $data);
 }
 public function autoActiveAd()
 {
     $curDate = date('Y-m-d H:i:s');
     $this->db->select('ad.*,u.*');
     $this->db->from(CLASSIFIEDAD_AD);
     $this->db->join(USER_U, "ad.clad_uid = u.u_id");
     $where = 'ad.clad_created_date < "' . date('Y-m-d H:i:s', strtotime('-30 minutes')) . '" AND ad.clad_active=2 AND u.u_active = 1 AND u.u_canpost=1 AND u.u_is_verified=1 AND ad.is_deleted=0';
     $this->db->where($where);
     $query = $this->db->get();
     $result = $query->result();
     //echo "<pre>"; print_r($this->db->queries);pr($result,9);exit;
     if (!empty($result)) {
         foreach ($result as $k => $v) {
             $where = 'clad_id = ' . $v->clad_id;
             $ret = $this->common_model->updateData(CLASSIFIEDAD, array('clad_active' => 1, 'clad_modified_date' => $curDate), $where);
             if ($ret) {
                 if ($v->u_email != '') {
                     $Arr = array();
                     $Arr['name'] = $v->u_fname;
                     $Arr['ad_title'] = $v->clad_title;
                     $Arr['siteurl'] = "http://" . $_SERVER['HTTP_HOST'];
                     $Arr['adUrl'] = createUrl("detail", array($v->clad_id, $v->clad_title));
                     $Arr['clad_id'] = $v->clad_id;
                     $Arr['baseurl'] = base_url();
                     $emailTpl = $this->load->view('email_templates/adLiveSuccessfully', $Arr, true);
                     //pr($emailTpl,8);
                     $ret = sendEmail($v->u_email, SUBJECT_NEWADLIVE_USER_NOTIFICATION, $emailTpl, FROM_EMAIL, FROM_NAME);
                 }
                 ## Send sms to customer who post ad
                 $phonemsg = AD_APPROVAL_NOTIFICATION;
                 ## take msg content from constant
                 $phonemsg = str_replace('{clad_id}', "#" . $v->clad_id, $phonemsg);
                 $response = connectMobile($phonemsg, $v->u_mobile);
                 $res = json_decode($response->raw_body, true);
             }
         }
     }
 }
Пример #17
0
?>
" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div >
                <!--<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>-->
                <h4 class="modal-title" id="myModalLabel">AMEND & RESUBMIT</h4>
            </div>
            <div class="modal-body">
                <?php 
if (count(Yii::app()->session[$session])) {
    foreach (Yii::app()->session[$session] as $key => $row) {
        ?>
                        <a href="<?php 
        //                        echo Yii::app()->createUrl('/site/dymodel', array('session' => $session));
        echo createUrl('/site/dymodel', array('session' => $session, 'key' => $key));
        ?>
">
                            <p class="modal-title" style="font-size:16px">Edit Menu <?php 
        echo $key + 1;
        ?>
</p>
                        </a>
                        <?php 
    }
}
?>
            </div>
            <div >
                <button type="button" class="buttoncomment" data-dismiss="modal">Close</button>
            </div>
Пример #18
0
</span></h2>
</div>
<!-- END PAGE TITLE -->

<div class="row">
	<div class="col-md-12">
		<div class="form-horizontal">
			<div class="panel panel-default">
				<div class="panel-heading">
					<ul class="panel-controls">
						<li><?php 
echo CHtml::link(at('Back'), createUrl('employee/addresses'), array('class' => 'btn btn-default'));
?>
</li>
						<li><?php 
echo CHtml::link(at('Edit'), createUrl('employee/addresses/update', array('id' => $model->id)), array('class' => 'btn btn-primary'));
?>
</li>
					</ul>
				</div>

				<div class="panel-body form-group-separated">
					<div class="form-group">
						<label class="col-md-3 col-xs-12 control-label"><?php 
echo CHtml::encode($model->getAttributeLabel('label'));
?>
</label>
						<div class="col-md-6 col-xs-12"><?php 
echo CHtml::encode($model->label);
?>
</div>
Пример #19
0
}
?>
                    </div>
                </div>
            </div>

            <div class="col-lg-12">

            </div> 
            <div class="col-lg-12 top20">
                <div class="col-lg-2 pull-left">
                    <button class='btn btn-primary bts btn-left' onclick = "goBack();" >Back</button>
                </div>
                <div class="col-lg-2 pull-right ">
                    <?php 
echo CHtml::ajaxButton("Submit", array('customer/CustomerReply'), array('type' => 'POST', 'dataType' => 'json', 'data' => array('customer' => array("ajax" => '1', 'provisional_date' => "js:\$('#Customer_provisional_date').val()", 'call_date' => "js:\$('#Customer_call_date').val()")), 'beforeSend' => "js:function(){\n                                 var cus_call_date = document.getElementById('Customer_call_date'),\n                                cus_pro_date = document.getElementById('Customer_provisional_date'),\n                                time = cus_call_date.value.substring(11,19),\n                                time1 = cus_pro_date.value.substring(11,19),                                \n                                arr = time.split(':'),\n                                arr1 = time1.split(':'),\n                                hour = arr[0],\n                                hour1 = arr1[0],\n                                minutes = arr[1],\n                                minutes1 = arr1[1],\n                                allow = 0\n                                ;\n                                if(!cus_call_date.value)    {\n                                    alert('Confirmation Call Date Is Mandatory');\n                                    return false;\n                                }\n                                if(!cus_pro_date.value)    {\n                                    alert('Provisional Date to Meet Is Mandatory');\n                                    return false;\n                                }\n                               }", 'success' => "function asd(){\n                    location.href='" . createUrl('customer/SaveSelProd') . "';\n                        }"), array('class' => 'btn btn-primary right5 bts pull-right', 'value' => 'Next'));
?>
  
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
                        $(function() {
                            $('#datetimepicker1').datetimepicker({
                                format: 'DD/MM/YYYY HH:mm',
                            });

                            $('#datetimepicker2').datetimepicker({
								format: 'DD/MM/YYYY HH:mm',
							});
Пример #20
0
            <a href="<?php 
echo createUrl('cms/page/index');
?>
"><h3 style="cursor: pointer; margin: 0; color: #fff;"><i class="fa fa-arrow-left" title="Manage Pages"></i></h3></a>
        </div>
        <div class="col-sm-10">
            <h3 style="margin: 0; text-align: center">Add Page</h3>
        </div>
    </div>
</header>
<?php 
$this->load->view('inc-messages');
?>
<div style="float: left; width: 100%">
    <form action="<?php 
echo createUrl('cms/page/add/');
?>
" method="post" enctype="multipart/form-data" name="regFrm" id="regFrm">
        <div id="tabsid">
            <div class="panel panel-primary nw">
                <div class="panel-heading">
                    <ul class="nav panel-tabs tpb">
                        <li class="active"><a data-toggle="tab" href="#tab1">Main</a></li>
                        <li><a data-toggle="tab" href="#tab2">Metadata </a></li>
                        <li><a data-toggle="tab" href="#tab3">Template </a></li>
                    </ul>

                </div>
                <div class="panel-body">
                    <div class="tab-content tpbc">
                        <div id="tab1" class="tab-pane active well">
Пример #21
0
            }
            ?>
                                </div>
                                <?php 
        }
    }
    ?>
                    </div>

                    <div class="col-sm-12" style="border-top: 1px solid #aaa">
                        <?php 
    foreach ($latestPost as $topicPostkey => $topicPostval) {
        if (in_array($topicPostval['forum_id'], $topicArray)) {
            ?>
                                Last post - <a href="<?php 
            echo createUrl('forum/getTopic/') . $topicPostval['forum_id'];
            ?>
"><?php 
            echo substr(trim($topicPostval['description']), 0, 50);
            ?>
</a> by <?php 
            echo $topicPostval['name'];
            ?>
on <?php 
            echo date("d-m-Y h:m", strtotime($topicPostval['post_date']));
            ?>
 <br/>
                                <?php 
        }
    }
    ?>
Пример #22
0
<?php

if (isset($do) && $do == "send") {
    if (!isset($_POST['register'])) {
        header('Location:' . createUrl(array("action" => "register")));
    } else {
        $error = registerUser($db);
    }
}
Пример #23
0
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<header class="panel-heading">
    <div class="row">
        <div class="col-sm-1">
            <i class="fa fa-user fa-2x"></i>
        </div>
        <div class="col-sm-10">
            <h3 style="margin: 0; text-align: center">Add Video</h3>
        </div>
        <div class="col-sm-1" style="text-align: right">
            <a href="<?php 
echo createUrl('manage_video');
?>
"><h3 style="cursor: pointer; margin: 0; color: #fff"><i class="fa fa-home" title="Manage Video"></i></h3></a>
        </div>
    </div>
</header>
<div class="col-lg-12 padding-0 mar-top15">
    <?php 
$this->load->view(THEME . 'messages/inc-messages');
?>
    <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1" class="add-user">
        
        <div class="form-group">
            <div class="col-sm-6">
                <label>Title</label>
                <input type="text" class="form-control" id="title" name="title" value="<?php 
echo set_value('title');
?>
" placeholder="Title *">
Пример #24
0
    <div class="row">
        <div class="col-sm-1">
            <a href="<?php 
echo createUrl('cms/menu/index/');
?>
"><h3 style="cursor: pointer; margin: 0; color: #fff;"><i class="fa fa-arrow-left" title="Manage Menus"></i></h3></a>
        </div>
        <div class="col-sm-10">
            <h3 style="margin: 0; text-align: center"><?php 
echo $menu_detail['menu_name'];
?>
</h3>
        </div>
        <div class="col-sm-1" style="text-align: right">
            <a href="<?php 
echo createUrl('cms/menu_item/add/' . $menu_detail['menu_id']);
?>
"><h3 style="cursor: pointer; margin: 0; color: #fff;"><i class="fa fa-plus-square" title="Add Menu Item"></i></h3></a>
        </div>
    </div>
</header>
<div class="col-lg-12 padding-0 mar-top15">
    <?php 
$this->load->view('inc-messages');
?>
    <?php 
if (count($menu_items) == 0) {
    $this->load->view('inc-norecords');
    return;
}
?>
Пример #25
0
<div class='col-lg-12'>
    <?php 
foreach ($models as $model) {
    ?>
        <div class='col-lg-2'>
            <br/>
            <img src='<?php 
    echo base_url();
    ?>
/images/folder.png' class='img-responsive'/>
            <center title='<?php 
    echo arrIndex($model, 'email');
    ?>
'>
                <a style="text-decoration:none;color:#000" href='<?php 
    echo createUrl('virtcab/index/' . arrIndex($model, 'id'));
    ?>
'>
                    <?php 
    echo ucfirst(arrIndex($model, 'name'));
    ?>
                </a>
            </center>
        </div>
        <?php 
    //        e($model);
    ?>

    <?php 
}
?>
Пример #26
0
						</li>
						<?php 
if ($model->status == 'saved') {
    ?>
							<li>
								<?php 
    if ($model->status == 'saved') {
        echo CHtml::link(at('Approve'), createUrl('attendance/off/approve', array('id' => $model->id)), array('class' => 'btn btn-primary', 'id' => 'Approve'));
    }
    ?>
							</li>							

							<li>
								<?php 
    if ($model->status == 'saved') {
        echo CHtml::link(at('Reject'), createUrl('attendance/off/reject', array('id' => $model->id)), array('class' => 'btn btn-primary', 'id' => 'Reject'));
    }
    ?>
							</li>
						<?php 
}
?>
							
					</ul>
				</div>
				<div class="panel-body form-group-separated">
					<div class="col-md-6">
						<div class="form-group">
							<label class="col-md-4 col-xs-12 control-label"><?php 
echo CHtml::encode($model->getAttributeLabel('id'));
?>
Пример #27
0
            </div>
            <div class="row col-md-12">
                <label>Enquiry List</label>
            </div>
            <div class="row col-md-12 ">
                <ul class="list-group">
                    <?php 
$list = null;
foreach ($availEnquiryList as $key => $value) {
    $list .= '<li class="list-group-item">   <div class="row" style="margin:2px 0;vertical-asign:middle">
                                        <div class="col-md-1"><i style="padding:2px;"
                                        class="btn-' . ($value['active'] ? $value['old'] ? 'danger fa fa-tag' : 'primary fa fa-tag' : 'primary fa fa-lock') . '"></i></div>
                                        <div class="col-md-3">' . $value['first_name'] . ' ' . $value['last_name'] . '</div>
                                        <div class="col-md-7">' . $value['enquiry'] . '</div>
                                        <button type="button" 
                                                onclick="window.location.assign(\'' . createUrl('enquiry/view/' . $value['id']) . '\')"
                                                class="col-md-1 btn btn-primary" 
                                                data-id="' . $value['id'] . '">View</button>
                                        </div>
                                </li>';
}
echo $list;
?>
                </ul>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="tab-pane <?php 
echo $tab_2;
?>
" id="tab_2">
Пример #28
0
                <td><?php 
    echo '&pound' . (arrIndex($invoice, 'inv_total_amount', 0) - arrIndex($invoice, 'paid_amount', 0));
    ?>
</td>
            </tr>
        <?php 
    $x++;
    ?>
            <?php 
}
?>
        </tbody>

        </table>
    </div>
</div>
<script>
    $(document).ready(function(){
        $('.reporttype').change(function(){
            var val = $(this).val()
            oldval = $(this).attr('reporttype');
            if(val != oldval){
                window.location.href = '<?php 
echo createUrl('reports/arrears/');
?>
'+val;
            }
        });
    });
</script>
Пример #29
0
						<?php 
if ($model->status == 'request') {
    ?>
							<li>
								<?php 
    if (getUser()->role == $model->approver_level) {
        echo CHtml::link(at('Approve'), createUrl('employees/mutation_approve', array('id' => $model->id)), array('class' => 'btn btn-primary', 'id' => 'Approve'));
    }
    ?>
							</li>
							<li>
								<?php 
    if (getUser()->role == $model->approver_level) {
        if ($model->type == 'rotation') {
            echo CHtml::link(at('Reject'), createUrl('employees/mutation_cancel', array('id' => $model->id)), array('class' => 'btn btn-primary', 'id' => 'Cancel'));
        }
    }
    ?>
								
							</li>
						<?php 
}
?>
							
					</ul>
				</div>

				<div class="panel-body form-group-separated">
					<div class="form-group">
						<label class="col-md-3 col-xs-12 control-label"><?php 
Пример #30
0
 function delete($id)
 {
     $this->Applicationsmodel->DeleteRecord($id);
     redirect(createUrl('applications/index/'));
 }