function load() { $plugin_name = $this->uri->segment(4); $this->template['functionName'] = strtolower(__FUNCTION__); $this->template['pluginName'] = $plugin_name; $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $plugindata = CI::model('core')->plugins_getPluginConfig($plugin_name); // //print PLUGINS_DIRNAME . $dirname .$plugin_name.'/'.$plugindata['plugin_admin_dir']. '/controller.php' ; if (is_file(PLUGINS_DIRNAME . $dirname . $plugin_name . '/' . $plugindata['plugin_admin_dir'] . '/controller.php') == true) { $firecms = get_instance(); define('THIS_PLUGIN_URL', site_url('admin/plugins/load') . '/' . $plugin_name . '/'); define('THIS_PLUGIN_DIRNAME', PLUGINS_DIRNAME . $dirname . $plugin_name . '/'); define('THIS_PLUGIN_DIRNAME_ADMIN', PLUGINS_DIRNAME . $dirname . $plugin_name . '/' . $plugindata['plugin_admin_dir'] . '/'); require_once PLUGINS_DIRNAME . $dirname . $plugin_name . '/' . $plugindata['plugin_admin_dir'] . '/controller.php'; } //$primarycontent = CI::view ( 'admin/comments/index', true, true ); //$secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function edit() { $this->template['functionName'] = strtolower(__FUNCTION__); $this->load->vars($this->template); if ($_POST) { $save = $this->cacaomail_model->saveMailAccounts($_POST); redirect('mailaccounts'); } $segs = $this->uri->segment_array(); $the_id = false; foreach ($segs as $segment) { if (stristr($segment, 'id:') == true) { $the_id = $segment; $the_id = substr($the_id, 3, strlen($the_id)); } } if (intval($the_id) != 0) { $form_values = $this->cacaomail_model->getMailAccounts(array('id' => $the_id), 1); $form_values = $form_values[0]; $this->template['form_values'] = $form_values; } else { //$this->template ['form_values'] = false; } $this->template['form_values']['account_groups'] = $this->cacaomail_model->getMailAccountsGroups(); $this->load->vars($this->template); $layout = CI::view('layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('mailaccounts/edit', true, true); $secondarycontent = CI::view('mailaccounts/sidebar', true, true); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function index() { $this->template['functionName'] = strtolower(__FUNCTION__); $data = array(); $data['is_moderated'] = 'n'; $form_values = CI::model('comments')->commentsGet($data); $this->template['new_comments'] = $form_values; $this->load->vars($this->template); $data = array(); $data['is_moderated'] = 'y'; $limit[0] = 0; $limit[1] = 100; $form_values = CI::model('comments')->commentsGet($data); $this->template['old_comments'] = $form_values; $this->load->vars($this->template); $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/comments/index', true, true); //$secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function register() { $this->template['functionName'] = strtolower(__FUNCTION__); $rules['username'] = "******"; $rules['password'] = "******"; $rules['passconf'] = "trim|required"; $rules['email'] = "trim|required|valid_email|xss_clean|callback_useremail_check"; $rules['accept'] = "callback_acceptterms_check|required|xss_clean"; $rules['captcha'] = "callback_captcha_check|required|xss_clean"; $this->validation->set_rules($rules); $fields['username'] = '******'; $fields['password'] = '******'; $fields['passconf'] = 'Password Confirmation'; $fields['email'] = 'Email Address'; //$fields ['accept'] = 'Please accept the Terms and Conditions'; $this->validation->set_fields($fields); $this->validation->set_error_delimiters('<div class="error">', '</div>'); if ($this->validation->run() == FALSE) { $primarycontent = CI::view('me/register', true, true); } else { $register = array(); $register['username'] = $this->input->post('username'); $register['password'] = $this->input->post('password'); $register['email'] = $this->input->post('email'); $register['is_active'] = 1; CI::model('users')->saveUser($register); $primarycontent = CI::view('me/register_done', true, true); } $this->load->vars($this->template); $layout = CI::view('layout', true, true); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); CI::library('output')->set_output($layout); }
function index() { $this->template['functionName'] = strtolower(__FUNCTION__); $tags = CI::model('core')->getParamFromURL('tags'); $data = array(); $this->template['search_by_keyword'] = ''; if ($tags) { $data['search_by_keyword'] = $tags; $this->template['search_by_keyword'] = $tags; } $results_count = CI::model('comments')->commentsGet($data, false, true); $items_per_page = CI::model('core')->optionsGetByKey('admin_default_items_per_page'); $content_pages_count = ceil($results_count / $items_per_page); $curent_page = CI::model('core')->getParamFromURL('curent_page'); if (intval($curent_page) < 1 || intval($curent_page) > $content_pages_count) { $curent_page = 1; } $page_start = ($curent_page - 1) * $items_per_page; $page_end = $page_start + $items_per_page; //$data ['is_moderated'] = 'n'; $form_values = CI::model('comments')->commentsGet($data, array($page_start, $page_end), false); $new_comments = array(); $old_comments = array(); for ($i = 0; $i < count($form_values); $i++) { if ($form_values[$i]['is_moderated'] == 'n') { $new_comments[] = $form_values[$i]; } else { $old_comments[] = $form_values[$i]; } } $this->template['content_pages_count'] = $content_pages_count; //var_dump($content_pages_count); $this->template['content_pages_curent_page'] = $curent_page; //get paging urls $content_pages = CI::model('content')->pagingPrepareUrls(false, $content_pages_count); $this->template['content_pages_links'] = $content_pages; $this->template['new_comments'] = $new_comments; $this->load->vars($this->template); /* $data = array ( ); $data ['is_moderated'] = 'y'; $limit [0] = 0; $limit [1] = 100; $form_values = CI::model('comments')->commentsGet ( $data ); */ $this->template['old_comments'] = $old_comments; $this->load->vars($this->template); $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/comments/index', true, true); //$secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function edit() { //CI::library ( 'session' )->set_userdata ( 'editmode', false ); $is_admin = is_admin(); if ($is_admin == false) { $go = site_url('login'); safe_redirect($go); } $layout = CI::view('admin/iframe', true, true); $layout = CI::model('template')->parseMicrwoberTags($layout); //$layout = CI::model('template')->parseMicrwoberTags ( $layout ); CI::library('output')->set_output($layout); }
function index() { $this->template['functionName'] = strtolower(__FUNCTION__); if (CI::library('session')->userdata('user') == false) { //redirect ( 'index' ); } $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/index', true, true); //$layout = str_ireplace ( '{primarycontent }', $primarycontent, $layout ); //$layout = str_ireplace ( '{secondarycontent}', $secondarycontent, $layout ); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function login() { $back_to = CI::model('core')->getParamFromURL('back_to'); global $cms_db_tables; $table = $cms_db_tables['table_users']; $username = $this->input->post('username', TRUE); $password = $this->input->post('password', TRUE); $user_action = $this->input->post('user_action', TRUE); if ($user_action == 'register') { $q = "select username from " . $table . " where username='******' "; $query = CI::db()->query($q); $query = $query->row_array(); $query = array_values($query); $username = $query[0]; if ($username != '') { $this->template['message'] = 'This user exists, try another one!'; } else { $data = array('updated_on' => date("Y-m-d h:i:s"), 'is_active' => 0, 'username' => $username, 'password' => $password); $this->db->insert($table, $data); $this->template['message'] = 'Success, try login now!'; } } else { $q = "select * from " . $table . " where username='******' and password='******' and is_active=1"; $query = CI::db()->query($q); $query = $query->row_array(); if (empty($query)) { $this->template['message'] = 'Wrong username or password, or user is disabled!'; } else { CI::library('session')->set_userdata('user', $query); if ($back_to == false) { redirect('dashboard'); } else { redirect(base64_decode($back_to)); } } } $this->load->vars($this->template); $layout = CI::view('layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('login', true, true); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); //CI::library('output')->set_output ( $layout ); }
function edit() { $this->template['functionName'] = strtolower(__FUNCTION__); $this->load->vars($this->template); if ($_POST) { $save = $this->cacaomail_model->saveMailCampaigns($_POST); redirect('mailcampaigns'); } $segs = $this->uri->segment_array(); $the_id = false; foreach ($segs as $segment) { if (stristr($segment, 'id:') == true) { $the_id = $segment; $the_id = substr($the_id, 3, strlen($the_id)); } } if (intval($the_id) != 0) { $form_values = $this->cacaomail_model->getMailCampaigns(array('id' => $the_id), 1); $form_values = $form_values[0]; $this->template['form_values'] = $form_values; //$mailist_groups_titles = $this->cacaomail_model->getMailAccountsGroups(); //$this->template ['form_values']['mailist_groups_titles'] = $mailist_groups_titles; } $mailist_account_groups = $this->cacaomail_model->getMailAccountsGroups(); $this->template['form_values']['mail_accounts_groups'] = $mailist_account_groups; $mailist_account_single = $this->cacaomail_model->getMailAccounts(); $this->template['form_values']['mail_accounts_singles'] = $mailist_account_single; $temp = $this->cacaomail_model->getJobfeedsGroups(); $this->template['form_values']['mail_lists_groups'] = $temp; $temp = $this->cacaomail_model->getJobfeeds(); $this->template['form_values']['mail_lists_singles'] = $temp; //`mailists_groups_ids` text, //`mailists_single_id` int(11) default NULL, $this->load->vars($this->template); $layout = CI::view('layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('mailcampaigns/edit', true, true); $secondarycontent = CI::view('mailcampaigns/sidebar', true, true); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function index() { $this->template['functionName'] = strtolower(__FUNCTION__); $data = array(); $reports_for = CI::model('core')->getParamFromURL('t'); if ($reports_for != false) { // $data['to_table'] = $reports_for; $data[] = array('to_table', $reports_for); } $reports = CI::model('reports')->reportsGet($data, false); $this->template['reports'] = $reports; $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/reports/index', true, true); //$secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function index() { $gogo = site_url('admin/content/posts_manage') . $togo_categories . $togo_tags; $gogo = reduce_double_slashes($gogo); header("Location: {$gogo} "); //var_dump ( $gogo ); exit; //http://test3.ooyes.net/admin $this->template['functionName'] = strtolower(__FUNCTION__); if (CI::library('session')->userdata('user') == false) { //redirect ( 'index' ); } $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/index', true, true); //$layout = str_ireplace ( '{primarycontent }', $primarycontent, $layout ); //$layout = str_ireplace ( '{secondarycontent}', $secondarycontent, $layout ); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function id($id) { global $cms_db_tables; $data = array(); //parent::ajax_json_get_items_for_order_id(); if ($id) { $q = "SELECT * FROM {$cms_db_tables['table_cart_orders']} WHERE id={$id}"; $q = CI::model('core')->dbQuery($q); $array_buf = $q[0]; $array_buf2 = array(); foreach ($array_buf as $key => $val) { if ($key != 'cvv2') { if ($key == 'cardholdernumber') { $val = substr_replace($val, "######", 0, strlen($val) - 4); } $array_buf2[$key] = $val; } } $data['order_info'] = $array_buf2; } $primarycontent = CI::view('admin/popup', $data); }
function add() { $this->template['functionName'] = strtolower(__FUNCTION__); if ($_POST) { CI::model('core')->cacheDelete('cache_group', 'options'); CI::model('core')->optionsSave($_POST); redirect('admin/options/index'); } $all_options = CI::model('core')->optionsGet(false); $this->template['all_options'] = $all_options; $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/options/add', true, true); $nav = CI::view('admin/options/subnav', true, true); $primarycontent = $nav . $primarycontent; // $secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function sitemaps() { ob_clean(); header("Content-Type: text/xml; charset=UTF-8"); //header ( "Content-Type: application/rss+xml" ); global $cms_db_tables; $table = $cms_db_tables['table_content']; $sitemaps_count = false; $q = "select count(*) as qty from {$table} "; $q = CI::model('core')->dbQuery($q); $q = $q[0]['qty']; $q = intval($q); $maps_count = ceil($q / 200); $this->template['maps_count'] = $maps_count; $map_id = $this->uri->segment(3); $map_id = intval($map_id); if ($map_id == 0) { $this->template['the_index'] = true; $this->load->vars($this->template); $upperLimit = $maps_count; $lowerLimit = 1; $updates = array(); $sitemaps_urls = array(); while ($lowerLimit <= $upperLimit) { $some = ($upperLimit - $lowerLimit) * 200 + 0; $some2 = ($upperLimit - $lowerLimit) * 200 + 1; $q = "select updated_on from {$table} order by updated_on DESC limit 0,1 "; //var_dump($q); $q = CI::model('core')->dbQuery($q); $q = $q[0]['updated_on']; $updates[] = $q; $sitemaps_urls[] = urlencode(site_url('main/sitemaps/' . $lowerLimit)); $lowerLimit++; } $this->template['updates'] = $updates; $this->load->vars($this->template); foreach ($sitemaps_urls as $item1) { $ch = curl_init("http://www.google.com/webmasters/tools/ping?sitemap=" . $item1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); //echo $output; $ch = curl_init("http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=" . $item1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); } } else { $some = 200 * ($map_id - 1); $some2 = 200 * ($map_id + 0); $q = "select id, updated_on from {$table} order by updated_on DESC limit {$some},{$some2} "; $q = CI::model('core')->dbQuery($q); $updates = $q; $this->template['updates'] = $updates; $this->load->vars($this->template); } //www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2Fwww.yoursite.com%2Fsitemap.gz $this->template['posts'] = $posts; $this->load->vars($this->template); $layout = CI::view('sitemap.php', true, true); CI::library('output')->set_output($layout); }
function id($id, $image = '') { global $cms_db_tables; $opt = array(); $query = "SELECT * from {$cms_db_tables['table_cart_orders']} WHERE id={$id}"; $tracking_number = CI::model('core')->dbQuery($query); $opt['shipping_service'] = $tracking_number[0]['shipping_service']; $opt['transactionid'] = $tracking_number[0]['transactionid']; $opt['user_shipper_company_name'] = $tracking_number[0]['scompany']; $opt['user_shipper_person_name'] = $tracking_number[0]['sname']; $opt['user_phone_dial_plan_number'] = trim(substr($tracking_number[0]['sphone'], 0, 6)); $opt['user_phone_line_number'] = trim(substr($tracking_number[0]['sphone'], 6)); $opt['user_shipper_company_address1'] = $tracking_number[0]['saddress1']; $opt['user_shipper_company_address2'] = $tracking_number[0]['saddress2']; $opt['user_shipper_company_city'] = $tracking_number[0]['scity']; $opt['user_shipper_state'] = $tracking_number[0]['sstate']; $opt['user_shipper_zip'] = $tracking_number[0]['szipcode']; $query = "SELECT * from {$cms_db_tables['table_cart']} WHERE order_id='{$tracking_number[0]['order_id']}'"; $shipment = CI::model('core')->dbQuery($query); $opt['shipment_weight'] = $shipment[0]['weight']; $opt['shipment_length'] = $shipment[0]['length']; $opt['shipment_width'] = $shipment[0]['width']; $opt['shipment_height'] = $shipment[0]['height']; if ($image) { $dat = base64_decode($tracking_number[0]["tracking_number"]); $data['image'] = $dat["tracking_number"]; } else { if (trim($tracking_number[0]["tracking_number"]) != '') { $tr = array(); $tr_buf = array(); $tr_buf = explode('|', base64_decode($tracking_number[0]["tracking_number"])); for ($i = 0; $i < count($tr_buf); $i++) { $res = explode(':', $tr_buf[$i]); if ($res[0] != 'graphic_image') { $tr[$res[0]] = $res[1]; } } $data['output_xml'] = $tr; } else { $options = array(); $options = CI::model('core')->optionsGetByKey('shop_ups_xml_key', true); $opt['ups_xml_access_key'] = $options['option_value']; $options = CI::model('core')->optionsGetByKey('shop_ups_username', true); $opt['ups_userid'] = $options['option_value']; $options = CI::model('core')->optionsGetByKey('shop_ups_password', true); $opt['ups_password'] = $options['option_value']; $options = CI::model('core')->optionsGetByKey('shop_ups_shipper_number', true); $opt['ups_shipper_number'] = $options['option_value']; $opt['shop_ups_shipper_company_name'] = CI::model('core')->optionsGetByKey("shop_ups_shipper_company_name", false); $opt['shop_ups_shipper_person_name'] = CI::model('core')->optionsGetByKey("shop_ups_shipper_person_name", false); $opt['phone_dial_plan_number'] = trim(substr(CI::model('core')->optionsGetByKey("shop_ups_shipper_company_phone", false), 0, 6)); $opt['phone_line_number'] = trim(substr(CI::model('core')->optionsGetByKey("shop_ups_shipper_company_phone", false), 6)); $opt['shop_ups_shipper_company_address'] = CI::model('core')->optionsGetByKey("shop_ups_shipper_company_address", false); $opt['shop_ups_shipper_company_city'] = CI::model('core')->optionsGetByKey("shop_ups_shipper_company_city", false); $opt['shop_orders_ship_from_zip'] = CI::model('core')->optionsGetByKey("shop_orders_ship_from_zip", false); $result = $this->getUPS($opt); if (!empty($result) && $result["tracking_number"]) { $bufer = ""; foreach ($result as $key => $val) { $bufer .= "{$key}:{$val}|"; } $bufer = rtrim($bufer, '|'); $dat = base64_encode($bufer); $query = "UPDATE {$cms_db_tables['table_cart_orders']} set tracking_number='{$dat}' WHERE id={$id}"; CI::model('core')->dbQ($query); $data['output_xml'] = $result; } } $data['id'] = $id; } CI::view('admin/ups', $data); }
function index() { //create blank data array to return $data = array(); session_start(); unset($_SESSION['facebook']); $this->load->library('fb_connect'); $data = array('facebook' => $this->fb_connect->fb, 'fbSession' => $this->fb_connect->fbSession, 'user' => $this->fb_connect->user, 'uid' => $this->fb_connect->user_id, 'fbLogoutURL' => $this->fb_connect->fbLogoutURL, 'fbLoginURL' => $this->fb_connect->fbLoginURL, 'base_url' => site_url('fb_login'), 'appkey' => $this->fb_connect->appkey); //p($data); if ($data['user']) { if ($data['user']["id"]) { /*if(stristr($k, 'fbs_')){ //var_dump($v); //setcookie( $k); }*/ $userdata_check = array(); $userdata_check['fb_uid'] = $data['user']["id"]; $userdata_check = CI::model('users')->getUsers($userdata_check, $limit = false, $count_only = false); if ($userdata_check == false) { //p($data['user']); $to_save = array(); $to_save['username'] = $data['user']["first_name"] . $data['user']["last_name"] . $data['user']["id"]; $to_save['password'] = rand() . rand() . rand(); $to_save['email'] = $data['user']["email"]; $to_save['is_active'] = 'y'; $to_save['first_name'] = $data['user']["first_name"]; $to_save['last_name'] = $data['user']["last_name"]; $to_save['is_admin'] = 'n'; $to_save['fb_uid'] = $data['user']["id"]; $userdata_check = CI::model('users')->saveUser($to_save); $userdata_check = $to_save; } else { $userdata_check = $userdata_check[0]; } if (!empty($userdata_check)) { //$test = $this->validate_user_facebook($userdata_check ['fb_uid']); //var_Dump($test); CI::library('session')->set_userdata('the_user', $userdata_check); $user_session = array(); $user_session['is_logged'] = 'yes'; $user_session['user_id'] = $userdata_check['id']; CI::library('session')->set_userdata('user_session', $user_session); } CI::view('fb_login_done', $data); //redirect ( site_url ('dashboard') ); //p ( $userdata_check ); /*CI::library('session')->set_userdata ( 'the_user', $userdata_check ); $user_session = array (); $user_session ['is_logged'] = 'yes'; $user_session ['user_id'] = $userdata_check ['id']; CI::library('session')->set_userdata ( 'user_session', $userdata_check );*/ // } } else { /*$this->template ['data'] = $data; $this->load->vars ( $this->template ); $content_filename = $this->load->file ( DEFAULT_TEMPLATE_DIR . 'blocks/users/fb_login.php', true ); print ($content_filename) ; exit ();*/ /* p ( $data ); CI::library('session')->set_userdata ( 'the_user', $userdata_check ); CI::library('session')->set_userdata ( 'user_session', $user_session );*/ //CI::library('session')->unset_userdata('the_user'); // CI::library('session')->unset_userdata('user_session'); CI::view('fb_login', $data); } }
$opts['no_microwber_tags'] = true; $opts['no_remove_div'] = true; $layout = str_ireplace('{content}', '', $layout); if (is_file(ACTIVE_TEMPLATE_DIR . 'controllers/pre_layout_display.php')) { include_once ACTIVE_TEMPLATE_DIR . 'controllers/pre_layout_display.php'; } $stats_js = CI::model('stats')->get_js_code(); $layout = CI::model('template')->parseMicrwoberTags($layout); //$layout = CI::model('template')->parseMicrwoberTags($layout); // $layout = CI::model('template')->parseMicrwoberTags($layout); $editmode = CI::library('session')->userdata('editmode'); if ($editmode == true) { $is_admin = is_admin(); if ($is_admin == true) { $layout = CI::model('template')->addTransparentBackgroudToFlash($layout); $layout_toolbar = CI::view('admin/toolbar', true, true); if ($layout_toolbar != '') { $layout = str_replace('</body>', $layout_toolbar . '</body>', $layout); $layout = str_replace('</ body>', $layout_toolbar . '</ body>', $layout); //some developers put spaces $layout = str_replace('</ body>', $layout_toolbar . '</ body>', $layout); //some developers put moooore spaces } } } if ($stats_js != false) { $layout = str_replace('</body>', $stats_js . '</body>', $layout); } //<script type="text/javascript" src="http://google.com/jsapi"></script> // $layout = CI::model('template')->parseMicrwoberTags ( $layout, $opts ); if ($content_display_mode == 'extended_api_with_no_template') {
function menus_add() { $this->template['functionName'] = strtolower(__FUNCTION__); //edit menu $edit = CI::model('core')->getParamFromURL('edit'); //var_dump ( $edit ); if (intval($edit) != 0) { $data = array(); $data['item_type'] = 'menu'; $data['id'] = $edit; $menu = CI::model('content')->getMenus($data); $this->template['form_values'] = $menu[0]; } $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = CI::view('admin/content/menus/menus_add', true, true); $nav = CI::view('admin/content/menus/menus_nav', true, true); $primarycontent = $nav . $primarycontent; $secondarycontent = false; $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); CI::library('output')->set_output($layout); }
<?php CI::view('header'); ?> <p><?php echo $message; ?> </p> <p><?php echo $no; ?> | <?php echo $yes; ?> <?php CI::view('footer'); /* End of file delete.php */ /* Location: ./system/scaffolding/views/delete.php */
function index() { $module_info = url_param('module_info', true); if ($module_info) { if ($_POST['module']) { $_POST['module'] = str_replace('..', '', $_POST['module']); $try_config_file = MODULES_DIR . '' . $_POST['module'] . '_config.php'; if (is_file($try_config_file)) { include $try_config_file; if ($config['icon'] == false) { $config['icon'] = MODULES_DIR . '' . $_POST['module'] . '.png'; $config['icon'] = pathToURL($config['icon']); } print json_encode($config); exit; } } } $is_iframe = url_param('iframe'); $base64 = url_param('base64', true); $admin = url_param('admin', true); $mod1 = url_param('module_name', true); $decode_vars = url_param('decode_vars', true); $reload_module = url_param('reload_module', true); $mod_to_edit = url_param('module_to_edit', true); $element_id = url_param('element_id', true); if ($mod1 != false) { $mod1 = urldecode($mod1); } $mod_iframe = false; if ($mod_to_edit != false) { $mod_to_edit = str_ireplace('_mw_slash_replace_', '/', $mod_to_edit); $mod_iframe = true; } //p($mod_to_edit); if ($base64 == false) { if ($is_iframe) { $data = $is_iframe; $data = base64_decode($data); $data = unserialize($data); } else { $data = $_POST; } if ($reload_module == 'edit_tag') { $reload_module = $_POST; $data = $reload_module; //p($data); } if ($mod1 != '') { $data['module'] = $mod1; } $is_page_id = url_param('page_id', true); if ($is_page_id != '') { $data['page_id'] = $is_page_id; } $is_post_id = url_param('post_id', true); if ($is_post_id != '') { $data['post_id'] = $is_post_id; } $is_category_id = url_param('category_id', true); if ($is_category_id != '') { $data['category_id'] = $is_category_id; } $is_rel = url_param('rel', true); if ($is_rel != '') { $data['rel'] = $is_rel; if ($is_rel == 'page') { $test = get_ref_page(); if (!empty($test)) { if ($data['page_id'] == false) { $data['page_id'] = $test['id']; } } //p($test); } if ($is_rel == 'post') { //$refpage = get_ref_page (); $refpost = get_ref_post(); if (!empty($refpost)) { if ($data['post_id'] == false) { $data['post_id'] = $refpost['id']; } } } if ($is_rel == 'category') { //$refpage = get_ref_page (); $refpost = get_ref_post(); if (!empty($refpost)) { if ($data['post_id'] == false) { $data['post_id'] = $refpost['id']; } } } } $tags = false; if ($data['mw_params_module'] != false) { if (trim($data['mw_params_module']) != '') { $data['module'] = $data['mw_params_module']; } } //p($data); foreach ($data as $k => $v) { $tags .= "{$k}=\"{$v}\" "; } $tags = "<microweber {$tags}></microweber>"; } else { if ($base64 == 'undefined') { exit; } //$base64 = base64_decode ( $base64 ); if (is_string($base64) == false) { // $base64 = false; } //$base64 = unserialize($base64); //p ( $base64 ); // } if ($base64 != false) { $tags = $base64; if ($mod_iframe == true) { $mod_iframe = 'quick_edit="true"'; } $tags = "<microweber module='{$mod_to_edit}' module_id='{$element_id}' {$mod_iframe} ></microweber>"; } //p ( $tags ); //exit; $opts = array(); $opts['admin'] = $admin; if ($base64 != false or $is_iframe != false) { $opts['do_not_wrap'] = true; } $res = CI::model('template')->parseMicrwoberTags($tags, $opts); if ($admin == true) { $is_admin = is_admin(); if ($is_admin == false) { $go = site_url('login'); safe_redirect($go); } $opts['no_cache'] = true; $res_1 = CI::view('admin/module_admin', true, true); $res_1 = CI::model('template')->parseMicrwoberTags($res_1, $opts); } if ($res_1) { $res = str_replace('{content}', $res, $res_1); } print $res; exit; // phpinfo(); }
function taxonomy_tags() { $this->template['functionName'] = strtolower(__FUNCTION__); $tags = CI::model('taxonomy')->taxonomyTagsGetOrderByPopularity(); $this->template['form_values'] = $tags; $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); //$layout = CI::view ( 'admin/layout', true, true ); $primarycontent = CI::view('admin/content/taxonomy_tags', true, true); $nav = CI::view('admin/content/taxonomy_nav', true, true); $primarycontent = $nav . $primarycontent; $secondarycontent = CI::view('admin/content/sidebar', true, true); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function contentMediaVideosList() { $this->template['functionName'] = strtolower(__FUNCTION__); global $cms_db_tables; $table = $cms_db_tables['table_media']; $queue_id = CI::model('core')->getParamFromURL('queue_id', false, true); $to_table = CI::model('core')->getParamFromURL('to_table', false, true); $to_table_id = CI::model('core')->getParamFromURL('to_table_id', false, true); //var_dump($queue_id,$to_table,$to_table_id); //p($q); if (strval(trim($queue_id) != '')) { $q = "SELECT id FROM {$table} WHERE to_table = '{$to_table}' AND queue_id = '{$queue_id}' AND to_table_id IS NULL AND ID is not null ORDER BY media_order"; $q = CI::model('core')->dbQuery($q); $ids = CI::model('core')->dbExtractIdsFromArray($q); if (!empty($ids)) { $media_get = array(); $media_get['queue_id'] = trim($queue_id); $media_get['to_table'] = $to_table; //$media_get ['to_table_id'] = $to_table_id; $media1 = CI::model('core')->mediaGet2(false, false, $ids); //p($media1); $this->template['videos'] = $media1['videos']; } } else { $media1 = array(); } //var_dump ( $media1 ); if (intval($to_table_id) != 0) { $media_get = array(); //$media_get ['queue_id'] = $queue_id; $media_get['to_table'] = $to_table; $media_get['to_table_id'] = $to_table_id; $q = "SELECT id FROM {$table} WHERE to_table = '{$to_table}' AND to_table_id = '{$to_table_id}' AND ID is not null ORDER BY media_order"; $q = CI::model('core')->dbQuery($q); $ids = CI::model('core')->dbExtractIdsFromArray($q); if (!empty($ids)) { $media2 = CI::model('core')->mediaGet2(false, false, $ids); //p($media2); $this->template['videos'] = $media2['videos']; } } else { $media2 = array(); } //var_dump ( $media2 ); //var_dump ( $media1 ); if (!empty($media1)) { //$media1 = $media1 ['videos']; } if (!empty($media2)) { //$media2 = $media2 ['videos']; } //var_dump( $media1, $media2); $videos = @array_merge($media1, $media2); //var_dump ( $videos ); $videos = $videos['videos']; //@array_unique ( $videos ); //$this->template ['videos'] = $videos; //$medias = array_merge ( $media1, $media2 ); //var_dump($medias); //$this->template ['medias'] = $medias; $this->load->vars($this->template); $layout = CI::view('admin/media/contentMediaVideosList', true, true); //CI::library('output')->set_output ( $layout ); exit($layout); }
function currencies() { $this->template['functionName'] = strtolower(__FUNCTION__); $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/orders/currency', true, true); $nav = CI::view('admin/orders/subnav', true, true); $primarycontent = $nav . $primarycontent; //$secondarycontent = CI::view ( 'admin/content/sidebar', true, true ); $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function index() { CI::view('welcome_message'); }
function edit() { $this->template['functionName'] = strtolower(__FUNCTION__); //if (CI::library('session')->userdata ( 'user' ) == false) { //redirect ( 'index' ); //} if ($_POST) { CI::model('users')->saveUser($_POST); $gogo = site_url('admin/users/index'); $gogo = reduce_double_slashes($gogo); header("Location: {$gogo} "); exit; } $tags = CI::model('core')->getParamFromURL('id'); if (intval($tags) != 0) { $criteria = array(); //$this->template ['search_by_keyword'] = ''; if ($tags) { $criteria['id'] = $tags; //$this->template ['search_by_keyword'] = $tags; } $users = CI::model('users')->getUsers($criteria, false, false); $users = $users[0]; } else { $userz = CI::model('core')->dbGetTableFields(TABLE_PREFIX . 'users'); foreach ($userz as $item) { $users[$item] = ''; } } //p($users); $this->template['form_values'] = $users; $this->load->vars($this->template); $layout = CI::view('admin/layout', true, true); $primarycontent = ''; $secondarycontent = ''; $primarycontent = CI::view('admin/users/edit', true, true); $secondarycontent = ''; $layout = str_ireplace('{primarycontent}', $primarycontent, $layout); $layout = str_ireplace('{secondarycontent}', $secondarycontent, $layout); //CI::view('welcome_message'); CI::library('output')->set_output($layout); }
function index() { if ($_POST) { $user = $_POST['username']; $pass = $_POST['password']; $email = $_POST['email']; $data = array(); $data['username'] = $user; $data['password'] = $pass; $data['is_active'] = 'y'; // p ( $data ); //p ( $_POST ); $data = CI::model('users')->getUsers($data); $data = $data[0]; if (empty($data)) { if (trim($email) != '') { $data = array(); $data['email'] = $email; $data['password'] = $pass; $data['is_active'] = 'y'; $data = CI::model('users')->getUsers($data); $data = $data[0]; } } if (empty($data)) { CI::library('session')->unset_userdata('the_user'); safe_redirect('login'); exit; } else { CI::library('session')->set_userdata('the_user', $data); $user_session = array(); $user_session['is_logged'] = 'yes'; $user_session['user_id'] = $data['id']; //p ( $data ); //p ( $user_session ); CI::library('session')->set_userdata('user_session', $user_session); if ($data["is_admin"] == 'y') { if ($_POST['where_to'] == 'live_edit') { $p = get_page(); if (!empty($p)) { $link = page_link($p['id']); $link = $link . '/editmode:y'; safe_redirect($link); //p($link,1); } else { safe_redirect('admin'); } //p($p,1); } else { safe_redirect('admin'); } } else { $go = site_url(); safe_redirect("{$go}"); } //$data = $data[0]; //var_dump($data); //var_dump($_POST); exit; } } $this->template['functionName'] = strtolower(__FUNCTION__); $this->load->vars($this->template); // $layout = CI::view ( 'layout', true, true ); $primarycontent = CI::view('login', true, true); print $primarycontent; // $layout = str_ireplace ( '{primarycontent}', $primarycontent, $layout ); //CI::library('output')->set_output ( $primarycontent ); exit; }