예제 #1
0
 /**
  * Enables custom login.
  * @since 1.0
  */
 public function enable_login()
 {
     // Check on additional unwanted runs.
     if (defined('DOING_AJAX') && DOING_AJAX || Request::input('wc-ajax') || Request::input('error')) {
         return;
     }
     // Register script
     wp_register_script('addon-loginpage', asset_url('../assets/dist/wp-loginpage.min.js', __FILE__), ['jquery'], '1.0.0', true);
     // Enable pages
     global $pagenow;
     switch ($pagenow) {
         case 'wp-register.php':
             $this->mvc->call('SignupController@register');
             die;
         case 'wp-login.php':
             switch (Request::input('action')) {
                 case 'register':
                     $this->mvc->call('SignupController@register');
                     die;
                 case 'lostpassword':
                     $this->mvc->call('PasswordController@lost');
                     die;
                 case 'rp':
                     $this->mvc->call('PasswordController@reset');
                     die;
             }
             $this->mvc->call('LoginController@login');
             die;
     }
 }
예제 #2
0
 /**
  * @author Minh Duc Nguyen <*****@*****.**>
  */
 function run_test()
 {
     /* Set up variables to pass to the test functions to stimulate good and faulty DOI API calls */
     $app_id = $this->config->item('gDOIS_TEST_APP_ID');
     $incorrect_app_id = 'mvivnnvnjvn4tjvmve2432nvbthth';
     $shared_secret = $this->config->item('gDOIS_TEST_SHARED_SECRET');
     $incorrect_shared_secret = 'gmpryonty';
     $url = 'http://devl.ands.org.au/example1.php';
     $incorrect_url = 'http;//no.domain.exists/example.php';
     $doiversion_service_points = array('v1.0' => 'https://services.ands.org.au/home/dois/doi_', 'v1.1' => 'https://services.ands.org.au/doi/1.1/', 'test' => apps_url() . '/mydois/');
     $validxml = 'xml=' . file_get_contents(asset_url('test_cases/doi/validxml.xml'), 'test_suite');
     $invalidxml = 'xml=' . file_get_contents(asset_url('test_cases/doi/invalidxml.xml'), 'test_suite');
     $requestURI = $doiversion_service_points['v1.1'];
     $requestURI = $doiversion_service_points['test'];
     $v1_service_url = $doiversion_service_points['v1.0'];
     /* first we mint a DOI using the latest version of the CMD API*/
     $testDOI = $this->test_mint($app_id, $shared_secret, $url, $requestURI, 'mint', 'json', $validxml);
     $this->unit->run(is_string($testDOI), true, 'Test Mint returns DOI: ' . $testDOI);
     if ($testDOI) {
         $validxml = str_replace('<identifier identifierType="DOI"></identifier>', '<identifier identifierType="DOI">' . $testDOI . '</identifier>', $validxml);
         $this->test_doi_api_functions($app_id, $shared_secret, $url, $testDOI, $validxml, $requestURI);
         $this->test_doi_authentication($app_id, $incorrect_app_id, $shared_secret, $incorrect_shared_secret, $url, $testDOI, $requestURI);
         $this->test_doi_xml($app_id, $shared_secret, $url, $testDOI, $validxml, $invalidxml, $requestURI);
         $this->test_doi_service_point($app_id, $shared_secret, $url, $testDOI, $validxml, $v1_service_url, $requestURI);
         $this->test_response_type($app_id, $shared_secret, $url, $testDOI, $validxml, $requestURI);
     } else {
         return;
     }
 }
예제 #3
0
 function fetchLogo($group)
 {
     $slug = url_title($group, '-', true);
     //check for custom logo that is published
     $data = $this->fetchData($group);
     if ($data) {
         $data = json_decode($data->{'data'}, true);
         if (isset($data['hide_logo']) && $data['hide_logo']) {
             return false;
         }
         if (isset($data['logo'])) {
             return $data['logo'];
         }
     }
     //check for default path
     $path = 'applications/portal/group/assets/logos/' . $slug . '.jpg';
     $path2 = 'applications/portal/group/assets/logos/' . $slug . '.png';
     if (file_exists($path)) {
         return asset_url('group/logos/' . $slug . '.jpg', 'full_base_path');
     } elseif (file_exists($path2)) {
         return asset_url('group/logos/' . $slug . '.png', 'full_base_path');
     } else {
         return false;
     }
     return false;
 }
예제 #4
0
    function get_child($member_id)
    {
        $network = $this->network_model->get_network($member_id);
        $html = "";
        $html .= "<ul class='child_genealogy network'>";
        foreach ($network as $item) {
            $content = '<div>
							<strong>Name : ' . strtoupper($item['lastname']) . ', ' . strtoupper($item['firstname']) . '</strong><br>
							<strong>Member ID : ' . $item['member_code'] . '</strong><br>
							<p>Email : ' . $item['email'] . '<br>
							Date Registered: ' . $item['date_registered'] . '</p>
						</div>';
            $html .= '<li>
						<div class="timeline-icon">
						
							<a href="javascript:void" data-source="' . base_url('genealogy/get-child/' . $item['id']) . '" data-memberid="' . $item['id'] . '"  id="child_degree" class="pophover" class="btn btn-default" data-container="body" data-toggle="popover" data-html="true" data-placement="top" data-content="' . $content . '">
								<img src="' . asset_url() . 'img/logo-big.png" width="30" />
							</a>
							
						</div>	
					  </li>
					';
        }
        $html .= "</ul>";
        echo $html;
    }
예제 #5
0
파일: category.php 프로젝트: Ankitj13/sss
 function postBycategory()
 {
     //code to load smileys on page....
     $image_array = get_clickable_smileys(asset_url() . 'smileys/', 'postContent');
     $col_array = $this->table->make_columns($image_array, 8);
     $data['smiley_table'] = $this->table->generate($col_array);
     $categoryId = $this->uri->segment(3, 0);
     $data['get_category_By_Id'] = $this->category_model->get_category_By_Id($categoryId);
     if (count($data['get_category_By_Id']) == 0) {
         redirect('');
     } else {
         $data['user_id'] = $this->tank_auth->get_user_id();
         $data['username'] = $this->tank_auth->get_username();
         $data['categories'] = $this->category_model->categories_list();
         $userId = $this->tank_auth->get_user_id();
         $data['getUserdetailsById'] = $this->user_model->getUserdetailsById($userId);
         $data['postContent'] = $this->post_model->getPostByCategoryId($categoryId);
         $data['categories'] = $this->category_model->categories_list();
         $data['get_category_By_Id'] = $this->category_model->get_category_By_Id($categoryId);
         $data['getAllLikeTypes'] = $this->like_model->getAllLikeTypes();
         $likecount = count($data['getAllLikeTypes']);
         if (count($data['postContent']) != 0) {
             for ($i = 0; $i < $likecount; $i++) {
                 foreach ($data['postContent'] as $postid) {
                     $count[$postid->postId] = $this->like_model->getCountLikeByPost($postid->postId, $i + 1);
                     $countcomments[$postid->postId] = $this->post_model->get_Nocomment_by_Postid($postid->postId);
                 }
                 $data['getLikeByPost'][$i] = $count;
                 $data['countComments'] = $countcomments;
             }
         }
         $this->load->view('home', $data);
     }
 }
예제 #6
0
    function get_members_lit($member_id, $position)
    {
        $network = $this->network_model->get_network($member_id);
        $html = '';
        $member_total = count($network);
        if ($member_total > 0) {
            $html .= '
						
					<div class="child" data-counter="' . $member_total . '">
						<!-- CHILD GENEALOGY -->
						<ul class="child_genealogy"  id="' . $position . '-child_' . $member_id . '" >';
            foreach ($network as $member) {
                $html .= '<li id="gen_' . $member['id'] . '"  class="first-net">
										<a href="javascript:void(0)" id="genealogy_' . $position . '" class="id_' . $member['id'] . '" data-gen_id="' . $member['id'] . '">
											<div class="timeline-icon">
												<img src="' . asset_url() . 'img/logo-big.png" width="30" />
											</div>
										</a>';
                if ($member['members'] > 0) {
                    $html .= '<div id="' . $position . '_hiddenDiv" class="members_container">
															<div id="' . $position . '_verticalDiv">
															</div>
														</div>';
                }
                $html .= '</li>';
            }
            $html .= '</ul>
					</div>';
        }
        echo $html;
    }
예제 #7
0
파일: 50.php 프로젝트: hharrysidhu/OpenVBX
function create_application($name, $tenant_id)
{
    $ci =& get_instance();
    $ci->load->model('vbx_settings');
    $app_name = "OpenVBX :: {$name}";
    $twilio_sid = $ci->vbx_settings->get('twilio_sid', $tenant_id);
    $twilio_token = $ci->vbx_settings->get('twilio_token', $tenant_id);
    // Rare event, sid and/or token may be empty
    if (!empty($twilio_sid) && !empty($twilio_token)) {
        error_log('Processing tenant: ' . $tenant_id);
        $account = OpenVBX::getAccount($twilio_sid, $twilio_token);
        $applications = $account->applications->getIterator(0, 1, array('FriendlyName' => $app_name));
        $application = false;
        foreach ($applications as $_application) {
            if ($_application->friendly_name == $app_name) {
                $application = $_application;
            }
        }
        $params = array('FriendlyName' => $app_name, 'VoiceUrl' => tenant_url('twiml/dial', $tenant_id), 'VoiceFallbackUrl' => asset_url('fallback/voice.php'), 'VoiceMethod' => 'POST', 'SmsUrl' => '', 'SmsFallbackUrl' => '', 'SmsMethod' => 'POST');
        if (!empty($application)) {
            error_log('Modifying app: ' . $app_name);
            $application->update($params);
        } else {
            error_log('Creating app: ' . $app_name);
            $application = $account->applications->create($app_name, $params);
        }
        error_log('Created/Updated app for tenant id: ' . $tenant_id . ' - Application Sid: ' . $application->sid);
        $ci->vbx_settings->add('application_sid', $application->sid, $tenant_id);
    } else {
        error_log('Skipped app creation for tenant "' . $tenant_id . '" - incomplete account Sid/Token pair.');
    }
}
예제 #8
0
파일: User.php 프로젝트: valvuong/lvtn
 public function register()
 {
     if ($this->session->userdata('logged_in') == false) {
         $data['view'] = 'register/register';
         $data['title'] = 'Đăng kí tài khoản';
         $data['left_hidden'] = true;
         $data['right_hidden'] = true;
         /////////////////
         $this->load->helper('captcha');
         $vals = array('word' => '', 'img_path' => './asset/captcha/', 'img_url' => asset_url() . 'captcha', 'img_width' => '200', 'img_height' => 40, 'expiration' => 600, 'word_length' => 8, 'font_size' => 16, 'img_id' => 'Imageid', 'pool' => '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'colors' => array('background' => array(255, 255, 255), 'border' => array(255, 255, 255), 'text' => array(0, 0, 0), 'grid' => array(255, 40, 40)));
         $cap = create_captcha($vals);
         $data['content']['cap'] = $cap;
         $data_captcha = array('captcha_time' => $cap['time'], 'ip_address' => $this->input->ip_address(), 'word' => $cap['word']);
         $this->muser->save_captcha($data_captcha);
         ////////////////////
         $rules = array(array('field' => 'register-username', 'rules' => 'trim|required|min_length[3]|callback_check_username'), array('field' => 'register-password', 'rules' => 'trim|required|min_length[5]'), array('field' => 'register-repassword', 'rules' => 'trim|required|min_length[5]|matches[register-password]'), array('field' => 'register-email', 'rules' => 'trim|required|valid_email|callback_check_email'), array('field' => 'captcha', 'rules' => 'trim|required|callback_check_captcha'));
         $this->form_validation->set_rules($rules);
         if ($this->input->post('register')) {
             if ($this->form_validation->run()) {
                 $info = array('register' => array('username' => $this->input->post('register-username'), 'email' => $this->input->post('register-email'), 'password' => md5($this->input->post('register-password')), 'role' => 'ROLE_USER'), 'avatar' => $_FILES);
                 $id = $this->muser->create_user($info);
                 $data['view'] = 'register/success';
                 $data['content']['test'] = $_FILES;
             }
         }
         $this->load->view(LAYOUT, $data);
     } else {
         redirect('', 'refresh');
     }
 }
예제 #9
0
파일: User.php 프로젝트: barayuda/k-starter
 public function send_email($id)
 {
     $data = array();
     $this->stencil->title('Send email');
     if ($id != NULL) {
         $data['user'] = $this->user_model->get($id);
     }
     $this->stencil->data($data);
     if ($this->input->method() != 'post') {
         $this->stencil->js(asset_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js'));
         $this->stencil->css(asset_url('plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css'));
         $this->stencil->paint('admin/user-send-email');
     } else {
         $user = $this->kulkul_auth->user();
         $this->load->library('email');
         $config['charset'] = 'iso-8859-1';
         $config['wordwrap'] = TRUE;
         $config['mailtype'] = 'html';
         $this->email->initialize($config);
         $this->email->from($user->email, $user->full_name);
         $this->email->to($this->input->post('to'));
         $this->email->cc($this->input->post('cc'));
         $this->email->bcc($this->input->post('bcc'));
         $this->email->subject($this->input->post('subject'));
         $this->email->message($this->input->post('body'));
         $this->email->send();
         $this->session->set_flashdata('success', 'Your email has been sent');
         redirect('admin/user');
     }
 }
예제 #10
0
 public function __construct()
 {
     parent::__construct();
     $this->_authenticate('login', array(1));
     $this->load->model('common_model');
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'admin/leadtemplates.js'), 'type' => 'text/javascript'));
 }
예제 #11
0
파일: smileys.php 프로젝트: Ankitj13/sss
 function index()
 {
     $image_array = get_clickable_smileys(asset_url() . 'smileys/', 'comments');
     $col_array = $this->table->make_columns($image_array, 8);
     $data['smiley_table'] = $this->table->generate($col_array);
     $this->load->view('smiley_view', $data);
 }
예제 #12
0
파일: Settings.php 프로젝트: ArpanTanna/seo
 public function index()
 {
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/setting.js'), 'type' => 'text/javascript'));
     $user_id = $this->session->userdata('user_id');
     $user_data = getDbData('users', array('id' => $user_id));
     $this->template->view('settings/index', array('user_data' => $user_data));
 }
예제 #13
0
파일: Api.php 프로젝트: ArpanTanna/seo
 public function __construct()
 {
     parent::__construct();
     $this->template->set_template('guest_template');
     $this->load->model('common_model');
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'guest.js'), 'type' => 'text/javascript'));
 }
 public function register()
 {
     $data['scripts'] = array(asset_url() . "js/workshop_register_onspot.js");
     $this->load->view('menu/header');
     $this->load->view('workshops/register');
     $this->load->view('menu/footer', $data);
 }
예제 #15
0
 public function __construct($table)
 {
     $this->table = $table;
     parent::__construct();
     $this->images_path = asset_path() . "/images/{$this->entity_name}/";
     $this->images_url = asset_url() . "/images/{$this->entity_name}/";
     $this->table_fields = array_flip($this->db->list_fields($table));
 }
예제 #16
0
 public function __construct()
 {
     parent::__construct();
     $this->_authenticate('login', array(2));
     $this->load->model('common_model');
     $this->dynamic_load->add_css(array('href' => asset_url('css', 'agent.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'agent/leadtemplates.js'), 'type' => 'text/javascript'));
 }
예제 #17
0
 /**
  * Display the file manager.
  *
  * @return void
  */
 public function index()
 {
     $this->views['content'] = $this->load->view('admin/file/index', null, true);
     $this->javascript_files[] = asset_url('assets/admin/grocery_crud/texteditor/tinymce4/plugins/file-manager/js/file-manager.min.js');
     $this->javascript[] = $this->load->view('admin/file/js/file-manager.js', null, true);
     $this->css[] = $this->load->view('admin/file/css/index.css', null, true);
     $this->_layout();
 }
예제 #18
0
function unlink_image($image)
{
    $base_asset_url = asset_url();
    $base = str_replace($base_asset_url, '../public', $image);
    try {
        unlink($base);
    } catch (Exception $e) {
    }
}
 public function register()
 {
     $data['scripts'] = array(asset_url() . "js/workshop_register_onspot.js");
     $data['current_page'] = "workshop";
     $this->load->view('menu/header', $data);
     $this->load->view('sidebar/sidebar', $data);
     $this->load->view('workshops/register', $data);
     $this->load->view('menu/footer', $data);
 }
예제 #20
0
파일: Main.php 프로젝트: EvilStorm/marry
 /**
  * Index Page for this controller.
  *
  * Maps to the following URL
  * 		http://example.com/index.php/welcome
  *	- or -
  * 		http://example.com/index.php/welcome/index
  *	- or -
  * Since this controller is set as the default controller in
  * config/routes.php, it's displayed at http://example.com/
  *
  * So any other public methods not prefixed with an underscore will
  * map to /index.php/welcome/<method_name>
  * @see http://codeigniter.com/user_guide/general/urls.html
  */
 public function index()
 {
     echo "<meta charset='utf-8'>";
     //$this->output->set_header("Content-Type: text/html; charset=UTF-8;");
     echo "Margksrmf xptmxmry <br />";
     echo asset_url() . " <br />";
     $msg = "한글 테스트 <br />";
     echo '한글 그냥 잘나오네?';
     echo $msg;
 }
예제 #21
0
 public function index()
 {
     $this->stencil->css(asset_url('plugins/datatables/dataTables.bootstrap.css'));
     $this->stencil->js(array(asset_url('plugins/datatables/jquery.dataTables.js'), asset_url('plugins/datatables/dataTables.bootstrap.js'), asset_url('plugins/slimScroll/jquery.slimscroll.min.js')));
     $data['configs'] = $this->config_model->get_all();
     $this->stencil->title('Site Configurations');
     $this->stencil->data($this->session->flashdata());
     $this->stencil->data($data);
     $this->stencil->paint('admin/site_config');
 }
 /**
  * Layout
  *
  * Uses the information in the $view, $css and $javascript
  * variables to generate the layout for a page.
  */
 protected function _layout()
 {
     // help
     if (check_login()) {
         //$this->_help_general();
     }
     $this->load->helper(array('app', 'date'));
     // Load defaults
     $this->data['javascript_params'] = $this->get_javascript_param(NULL, TRUE);
     // insert the css files (if any)
     if (is_array($this->css_files)) {
         $this->data['css_files'] = array_unique($this->css_files);
     }
     // gather the css (if any) to insert
     $this->data['css'] = '';
     if (is_array($this->css) && !empty($this->css)) {
         foreach ($this->css as $css) {
             $this->data['css'] .= $css;
         }
     }
     // check if a layout was set
     if (is_null($this->layout)) {
         show_error('Set the admin layout with $this->layout=\'layout_name\'!');
     }
     if (is_array($this->preloaded_javascript_files)) {
         $this->preloaded_javascript_files[] = asset_url('assets/admin/grocery_crud/texteditor/tinymce4/plugins/file-manager/js/file-manager.min.js');
         $this->data['preloaded_javascript_files'] = array_unique($this->preloaded_javascript_files);
     }
     // insert the javascript files (if any)
     if (is_array($this->javascript_files)) {
         $this->data['javascript_files'] = array_unique($this->javascript_files);
     }
     // output the html-footer including javascript (if any)
     $this->data['javascript'] = '';
     if (is_array($this->javascript) && !empty($this->javascript)) {
         foreach ($this->javascript as $javascript) {
             $this->data['javascript'] .= $javascript;
         }
     }
     // is the user logged in
     $this->data['is_logged_in'] = check_login();
     $this->data['user_data'] = $this->data['is_logged_in'] ? get_user_data() : NULL;
     if (check_login()) {
         $this->load->library('app_log');
         $this->data['last_user_logs'] = $this->app_log->get_logs(NULL, 'login_success', NULL, get_user_data('id'), FALSE, 'date_created', 'desc', 2);
     }
     // get app settings (meta ea)
     $this->load->model('shared/app_settings_model');
     $this->data['app'] = $this->app_settings_model->get_app_settings();
     $this->data['data'] = $this->data;
     // merge data into views, views get the upperhand in conficts
     $this->views = array_merge($this->data, $this->views);
     // output the html-body with the views
     $this->load->view('admin/layouts/' . $this->layout, $this->views);
 }
예제 #23
0
 /**
  * Get the path to a versioned Elixir file.
  *
  * @param  string  $file
  * @return string
  *
  * @throws \InvalidArgumentException
  */
 function elixir($file)
 {
     static $manifest = null;
     if (is_null($manifest)) {
         $manifest = json_decode(file_get_contents(FCPATH . 'build/rev-manifest.json'), true);
     }
     if (isset($manifest[$file])) {
         return asset_url('build/' . $manifest[$file]);
     }
     throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
 }
예제 #24
0
파일: Web.php 프로젝트: ArpanTanna/seo
 public function index($isid = '')
 {
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'core/jquery.flot.js'), 'type' => 'text/javascript'));
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'core/jquery.flot.pie.js'), 'type' => 'text/javascript'));
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/base.js'), 'type' => 'text/javascript'));
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/web.js'), 'type' => 'text/javascript'));
     $this->lang->load('web', 'english');
     $id = $this->secure_data($isid);
     if ($id !== '') {
         $webdata = getDbData('ca_website', array('md5(id)' => $id));
         //print_r($webdata); exit;
         if (!$webdata) {
             show_404();
             exit;
         }
         $user_id = $this->session->userdata('user_id');
         if (!is_null($webdata['user_id'])) {
             if (!$user_id) {
                 show_404();
                 exit;
             }
             $web_user_id = $user_id;
             if ($user_id !== $webdata['user_id']) {
                 $userdata = getDbData('users', array('id' => $user_id));
                 //echo $userdata['agent'].$webdata['user_id']; exit;
                 if ($userdata['agent'] !== $webdata['user_id']) {
                     show_404();
                     exit;
                 }
                 $web_user_id = $userdata['agent'];
             }
             $lang = $webdata['lang'];
             $cond_web = array('select' => array('ca_website.*', 'ca_pagespeed.data'), 'join' => array(0 => array('table' => 'ca_pagespeed', 'condition' => 'ca_website.id = ca_pagespeed.wid', 'type' => 'left')), 'where' => array('md5domain' => $webdata['md5domain'], 'lang' => $lang, 'user_id' => $web_user_id), 'orderby' => array('field' => 'modified', 'order' => 'desc'), 'result' => 1);
             $websites = $this->common_model->get_rows($cond_web, 'ca_website');
         } else {
             $websites = array(0 => $webdata);
         }
         if (count($websites) > 0) {
             $this->website = $websites[0];
             $this->wid = $websites[0]['id'];
             $this->domain = $websites[0]['domain'];
             $this->load->library('My_Webmaster');
             $webmaster = new My_Webmaster();
             $this->collectionInfo();
             $this->reCaptchaConf = Utils::loadConfig('recaptcha');
             $this->captchaEnabled = (!empty($this->reCaptchaConf['public-key']) and !empty($this->reCaptchaConf['private-key']));
             $data = array('websites' => $websites, 'website' => $this->website, 'cloud' => $this->cloud, 'content' => $this->content, 'document' => $this->document, 'isseter' => $this->isseter, 'links' => $this->links, 'meta' => $this->meta, 'w3c' => $this->w3c, 'over_max' => 6, 'generated' => $this->generated, 'diff' => $this->diff, 'linkcount' => count($this->links['links']), 'rateprovider' => new RateProvider(), 'thumbnail' => $this->thumbnail, "pageSpeed" => $this->pageSpeed, "misc" => $this->misc, "grader" => $this->grader);
             //print_r($this->pageSpeed); exit;
             $this->template->view('web/index', $data);
         } else {
             show_404();
         }
     }
 }
예제 #25
0
파일: anjab.php 프로젝트: allfonso/simpeg2
 public function updateTreeUl()
 {
     include APPPATH . "libraries/Tree.php";
     $tree = new Tree();
     $anjab = $this->anjab_model->getAnjabOrder();
     foreach ($anjab as $row) {
         $tree->add_item($row['id'], $row['parent_id'], sprintf(' id="kategori_%s" data-category_id="%s"', $row['id'], $row['id']), $this->get_label($row));
     }
     $kategori = '<script src="' . asset_url('js/kategori.js') . '"></script>' . $tree->generate('class="sortable"');
     return $kategori;
 }
예제 #26
0
 /**
  * Styles and scripts for admin is here
  * and also the layout
  **/
 private function _load_layout()
 {
     /* load style on controller */
     $this->stencil->css(array('bootstrap.min.css', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', 'http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css', 'AdminLTE.min.css', 'skins/_all-skins.min.css'));
     /* load script on controller */
     $this->stencil->js(array('jQuery-2.1.3.min.js', 'bootstrap.min.js', asset_url('plugins/fastclick/fastclick.min.js'), 'app.min.js'));
     /* load slice */
     $this->stencil->slice(array('header' => 'admin/header', 'sidebar' => 'admin/sidebar', 'footer' => 'admin/footer'));
     /* pre loaded data */
     $this->stencil->data(array('tagline' => ''));
     $this->stencil->layout('admin/dashboard-layout');
 }
예제 #27
0
 public function index()
 {
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/base.js'), 'type' => 'text/javascript'));
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/dashboard.js'), 'type' => 'text/javascript'));
     //$lang = $this->config->item('langshort');
     $user_id = $this->session->userdata('user_id');
     if ($user_id && $this->session->userdata("user_type") == 2) {
         $qry = "SELECT ca_website.* FROM ca_website " . "WHERE ca_website.id IN (SELECT MAX(`cw`.`id`) from `ca_website` as `cw` WHERE `cw`.`user_id` = ? GROUP BY cw.md5domain, cw.lang) " . "ORDER BY ca_website.modified desc";
         $websites = $this->db->query($qry, array($user_id))->result_array();
     } else {
         $websites = array();
     }
     $this->template->view('dashboard/index', array('websites' => $websites));
 }
예제 #28
0
파일: Leads.php 프로젝트: ArpanTanna/seo
 public function index($gmid = '', $gauth = '')
 {
     $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/base.js'), 'type' => 'text/javascript'));
     $mid = $this->secure_data($gmid);
     $auth = $this->secure_data($gauth);
     $user_data = getDbData('users', array('md5(id)' => $mid, 'auth_code' => $auth));
     if ($user_data) {
         $this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/leads.js'), 'type' => 'text/javascript'));
         $this->template->view('leads/index', array('user_data' => $user_data));
     } else {
         show_404();
         exit;
     }
 }
예제 #29
0
 public function index()
 {
     $this->template->add_js('assets/j/accounts.js');
     $data = $this->init_view_data();
     $users = VBX_User::search(array('is_active' => 1));
     $data['users'] = $this->sort_users_by_lname($users);
     $groups = VBX_Group::search(array('is_active' => 1));
     if (!empty($groups)) {
         $data['groups'] = $groups;
     }
     $data['gravatars'] = $this->vbx_settings->get('gravatars', $this->tenant->id);
     $data['default_avatar'] = asset_url('assets/i/user-icon.png');
     $this->respond('', 'accounts', $data);
 }
예제 #30
0
 public function index()
 {
     $data['app_settings'] = $this->app_settings_model->get_app_settings();
     // get form submit
     $data['form_submit_success'] = $this->session->flashdata('form_submit_success');
     $this->views['content'] = $this->load->view('admin/site/index', $data, TRUE);
     $this->javascript_files[] = asset_url('assets/admin/js/cms.config.js');
     $this->javascript_files[] = asset_url('assets/admin/grocery_crud/texteditor/tinymce4/tinymce.min.js');
     $this->javascript_files[] = asset_url('assets/admin/grocery_crud/js/jquery_plugins/config/jquery.tine_mce.config.js');
     $this->javascript_files[] = asset_url('assets/admin/grocery_crud/js/jquery_plugins/jquery.datetimepicker.js');
     $this->css_files[] = asset_url('assets/admin/grocery_crud/css/jquery_plugins/jquery.datetimepicker.css');
     $this->javascript[] = $this->load->view('admin/site/js/index.js', $data, TRUE);
     // create the layout-HTML and show it to the user
     $this->_layout();
 }