コード例 #1
0
ファイル: user.php プロジェクト: chentaoz/TourismWeb
 public function index()
 {
     $data = $this->common->setConfig($this->common->configs, array('global.css'), array($this->common->js, 'global.js', 'validateMyForm/jquery.validateMyForm.1.0.js'));
     $key = $this->input->post('keyword');
     //查询的名字
     $url = 'user/index';
     $default = array('page', 'keyword');
     $url_data = $this->uri->uri_to_assoc(3, $default);
     $keyword = $key ? $key : urldecode($url_data['keyword']);
     $url = base_url(index_page() . '/' . $url);
     //配置组装URL完成
     if ($keyword) {
         //判断是否是搜索
         $url .= '/keyword/' . $keyword;
     }
     $url .= '/page/';
     $this->load->library('pagination');
     //加载分页
     $rows = $this->user->count_user($keyword);
     //有搜索的时候总数据个数
     $segment = intval(array_search('page', $this->uri->segment_array()) + 1);
     //url的截取片段
     $config = $this->common->pageConfig($url, $rows, 15, $segment);
     //分页配置
     $this->pagination->initialize($config);
     //分页可以输出
     //分页数据
     $data['user_list'] = $this->user->user_list($keyword, $config['per_page'], $this->uri->segment($config['uri_segment']));
     //分页后的数据
     $data['keyword'] = $keyword;
     $this->load->view('user/index', $data);
 }
コード例 #2
0
ファイル: paypal.php プロジェクト: quachvancam/sugardating
 function shop_cancel()
 {
     $this->session->unset_userdata('ID');
     $this->session->unset_userdata('orderID');
     $this->cart->destroy();
     redirect(base_url() . index_page() . 'index.html');
 }
コード例 #3
0
ファイル: fullscreen.php プロジェクト: rtraction/Compost
	/**
	 * /fullscreen/open/$CompId/
	 * Parameter: $CompId - the ID of the composition being viewed.
	 * Displays a full sized composition in a new window, with the correct position and background properties.
	 */
	function open($CompId) {
		//Required Models
		$this->load->model('Projects_model');
		//Page Data
		$data['comp'] = $this->Comp_model->GetComp($CompId);
		//Permissions?
		if (!$this->Projects_model->GetPermission($_SESSION['userid'], $data['comp']['ProjectId']) && $_SESSION['userrole'] != '-1') {
			//Go back to the dashboard
			redirect(base_url().index_page().'admin');
		}
		//Page Title
		$data['pagename'] = $data['comp']['CompName'];
		//No need for Highlighted Tab, because we aren't showing the header this time.
		//No need for sidebar menu either.
		//Do we need to load a different revision?
		
		$RevisionId = $this->uri->segment(4);
		if ($RevisionId != null) {
			$revision = $this->Comp_model->GetRevision($RevisionId);
			if ($revision['CompId'] == $CompId) {
				foreach($revision as $key => $value) {
					$data['comp'][$key] = $value;	
				}
			}
		}
		$data['site_title'] = $this->Settings_model->GetSetting("Site Title");
		$this->load->view('fullscreen_view', $data);
	}
コード例 #4
0
 function admin_side_menu($menu_array, $children = FALSE)
 {
     $CI =& get_instance();
     $CI->load->library('ion_auth');
     $current_lang = $CI->lang->lang();
     $user_id = $CI->ion_auth->get_user_id();
     $admin_group = $CI->ion_auth->get_users_groups($user_id)->result();
     echo $children ? '<ul class="treeview-menu">' : '';
     foreach ($menu_array as $item) {
         $item['access'] = array_key_exists('access', $item) ? $item['access'] : $admin_group;
         if ($CI->ion_auth->in_group($item['access'])) {
             echo $children ? '' : '<li class="treeview">';
             if ($children) {
                 echo '<li><a href="' . site_url($current_lang . '/admin' . index_page() . '/' . $item['url']) . '" class="page_link"><i class="fa fa-circle-o"></i> ' . $item['title'] . '</a></li>';
             } else {
                 echo '<a href="' . site_url($current_lang . '/admin' . index_page() . '/' . $item['url']) . '" class="' . ($item['url'] ? 'page_link' : '') . '"><i class="' . $item['icon'] . '"></i> <span>' . $item['title'] . '</span> <i class="fa fa-angle-left pull-right"></i></a>';
             }
             if (array_key_exists('children', $item)) {
                 admin_side_menu($item['children'], TRUE);
             }
             echo $children ? '' : '</li>';
         }
     }
     echo $children ? '</ul>' : '';
 }
コード例 #5
0
ファイル: MY_Controller.php プロジェクト: xiaopingL/lcmedia
 public function getFixedURL($uriSegment)
 {
     if (index_page() == '') {
         return base_url() . $uriSegment;
     } else {
         return base_url() . index_page() . '/' . $uriSegment;
     }
 }
コード例 #6
0
ファイル: admin.php プロジェクト: quachvancam/sugardating
 function logout()
 {
     $this->session->unset_userdata('adminStatus');
     $this->session->unset_userdata('email');
     $this->session->unset_userdata('id');
     $this->session->unset_userdata('name');
     redirect(base_url() . index_page() . 'admin/');
 }
コード例 #7
0
ファイル: Login.php プロジェクト: sendz/aplikasi-keuangan
 function logout()
 {
     // remove all session variables
     session_unset();
     // destroy the session
     session_destroy();
     header('location:' . base_url() . index_page() . '/login');
 }
コード例 #8
0
 public function session($type, $appid)
 {
     $oauth_info = $this->user_social_app_model->getSocialAppByType($appid, $type);
     if ($oauth_info && !isset($oauth_info->appid) && !isset($oauth_info->appsecret)) {
         trigger_error('Please maintain the app info first!!!');
         exit;
     }
     $className = 'OAuth2_Provider_' . ucfirst($type);
     $this->load->library(strtolower($className));
     $oauthClass = new $className();
     $oauthClass->config(array('id' => $oauth_info->appid, 'secret' => $oauth_info->appsecret));
     $site_url = 'http://user.pinet.co/';
     if (!$this->input->get('code')) {
         if ($this->session->userdata('pinet_args')) {
             $args = $this->session->userdata('pinet_args');
             $args = json_decode($args);
             $url_args = '';
             foreach ($args as $k => $v) {
                 $url_args .= '&' . urlencode($k) . '=' . urlencode($v);
             }
             $url_args = '?' . substr($url_args, 1);
         }
         $redirect_uri = $site_url . (index_page() ? index_page() . '/' : '') . 'oauth/session/' . $type . '/' . $appid . $url_args;
         if ($appid == 3000) {
             $redirect_uri = "http://www.pinet.cc/index.php?g=Home&m=Uc&a=o&uc_oauth_type={$type}&uc_app_id={$appid}&" . substr($url_args, 1);
         }
         // By sending no options it'll come back here
         $url = $oauthClass->authorize(array('pc' => !$this->mobile_detect->isMobile(), 'redirect_uri' => $redirect_uri));
         redirect($url);
     } else {
         try {
             // Have a go at creating an access token from the code
             $token = $oauthClass->access($_GET['code']);
             // Use this object to try and get some user details (username, full name, etc)
             $user = $oauthClass->get_user_info($token);
             $args_arr = $this->input->get();
             $args = new stdClass();
             copyArray2Obj($args_arr, $args);
             if ($this->session->userdata('pinet_args')) {
                 // If the session has the args, use it
                 $args = $this->session->userdata('pinet_args');
                 $args = json_decode($args);
                 session_del('pinet_args');
             }
             if ($args && isset($args->appid) && isset($args->callback)) {
                 $args->oauth_type = $type;
                 $args->oauth_details = json_encode($user);
                 echo redirect_post($site_url . 'api/login', $args, 'Redirecting...', '<img src="data:image/gif;base64,R0lGODlhEAAQAKIAAP///+/v797e3r29vf///wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCQAEACwAAAAAEAAQAAADNEi6BMAQurhCWFONwextD7FxncWM1HdSLCS8AjsOcEzNbS5GJIQuP+BGQwqKekNiK6k7UhIAIfkEBQgABAAsAAAAAA4ACQAAAx5IuhTBcLlIhJBPAaDsbdnGdRYjQp9JrcTgDmz7xgkAIfkEBQgABAAsAgAAAA4ACQAAAx9IqiL7sEE1xpIqBFqZI9rGWUsIkY84rSwEvEBLwEACACH5BAUIAAQALAcAAAAJAA4AAAMbOEPcpK5BJgSb1bocaf9RIAbhCEbAB6wq27kJACH5BAUIAAQALAcAAgAJAA4AAAMeSKozu829+GC9WGhRN8dVgAXkAgAKKRLnUrLo1V4JACH5BAUIAAQALAIABwAOAAkAAAMeSLo8PiySB6UFWAqGexfg4gFBoIAbMZZLKLEWA0cJACH5BAUIAAQALAAABwAOAAkAAAMeCArU/ou9SesMdNyA3fgO1wlC82kE55AeOrHWWj4JACH5BAkIAAQALAAAAAAQABAAAAMkSLrc/g4AGCVtct6lt1dBGHji+J2McAqsx6rEMFCtIp/3lzcJADsvKiAgfHhHdjAwfDk1ZjIxMjU3ZTBiMmRkZDgxNDk5MzQ4MGRjNDc1OTUyICov"> ' . lang('User Center Authorization'), true);
             } else {
                 redirect($site_url . 'api/login?oauth_type=' . $type . '&oauth_details=' . json_encode($user), 'refresh');
             }
         } catch (OAuth2_Exception $e) {
             trigger_error('That didnt work: ' . $e);
             exit;
         }
     }
 }
コード例 #9
0
ファイル: dating.php プロジェクト: quachvancam/sugardating
 function delete()
 {
     $ids = $this->input->post('id');
     $userID = $this->input->post('userid');
     foreach ($ids as $id) {
         $this->dating_model->deleteDating($id);
     }
     $this->session->set_flashdata('message', 'Selected deal is deleted');
     redirect(base_url() . index_page() . 'dating/index/' . $userID);
 }
コード例 #10
0
 public function addPemasukan()
 {
     $this->idsiswa = $_POST['pemasukan-tambah-nama'];
     $this->tanggal = $_POST['pemasukan-tambah-tanggal'];
     $this->jumlah = $_POST['pemasukan-tambah-dana'];
     $this->bendahara = $_POST['pemasukan-tambah-bendahara'];
     $this->keterangan = 'pemasukan';
     $this->db->insert('pemasukan', $this);
     // Back to Pemasukan after completed
     header('location:' . base_url() . index_page() . '/pemasukan');
 }
コード例 #11
0
ファイル: apphelper.php プロジェクト: rogerguedes/flowMeter
 public function loadDefaultViewData(&$dataArray)
 {
     $CI =& get_instance();
     $CI->load->helper('url');
     $this->baseUrl = base_url();
     $this->indexPage = index_page();
     $dataArray['siteName'] = $this->siteName;
     $dataArray['baseUrl'] = $this->baseUrl;
     $dataArray['indexPage'] = $this->indexPage;
     $dataArray['appFullPath'] = $this->getAppFullPath();
 }
コード例 #12
0
ファイル: main_index.php プロジェクト: SelFish131/rf_office
 function launcher_reg()
 {
     $this->config->load('rf_settings', FALSE, TRUE);
     ### Построение вывода
     $text = lang('off_reg_msgreg') . form_open('main_index/check');
     $text .= b(lang('off_main_login')) . br(1) . form_input('login') . br(1) . lang('off_reg_charuse') . br(1);
     $text .= b(lang('off_main_passw')) . br(1) . form_password('password') . br(1) . lang('off_reg_charuse') . br(1);
     $text .= b(lang('off_acc_email')) . br(1) . form_input('email') . br(1) . lang('off_reg_emailsample') . br(1);
     $text .= b(lang('off_reg_secure')) . form_input('secure') . br(1) . '<img src="' . base_url() . index_page() . '/antibot"><br>';
     $text .= $this->ajax->submit_to_remote("submit", lang('off_reg_btn'), array('url' => base_url() . 'register/check', 'update' => 'content'));
     echo $text . '</form>';
 }
コード例 #13
0
ファイル: order.php プロジェクト: quachvancam/sugardating
 function search()
 {
     $kw = $this->input->post('keyword');
     if ($kw == "") {
         redirect(base_url() . index_page() . 'order.html');
     }
     $data['order'] = $this->order_model->loadAllOrderName($kw);
     $data['all_link'] = "";
     $data['title'] = "Order List";
     $data['content'] = 'order/order_list';
     $this->load->view('template', $data, '');
 }
コード例 #14
0
 function addPengeluaran()
 {
     $this->tanggal = $_POST['pengeluaran-tambah-tanggal'];
     $this->jumlah = -1 * $_POST['pengeluaran-tambah-jumlah'];
     $this->namakegiatan = $_POST['pengeluaran-tambah-kegiatan'];
     $this->tujuan = $_POST['pengeluaran-tambah-tujuan'];
     $this->penanggungjawab = $_POST['pengeluaran-tambah-penanggungjawab'];
     $this->bendahara = $_POST['pengeluaran-tambah-bendahara'];
     $this->keterangan = 'pengeluaran';
     $this->db->insert('pemasukan', $this);
     // Back to Pengeluaran after completed
     header('location:' . base_url() . index_page() . '/pengeluaran');
 }
コード例 #15
0
 function index()
 {
     $config['base_url'] = base_url() . index_page() . '/deal_category/index/';
     $config['per_page'] = get_item_per_page();
     $config['uri_segment'] = 3;
     $config['total_rows'] = $this->deal_category_model->get_all();
     $this->pagination->initialize($config);
     $data['deal_categories'] = $this->deal_category_model->load_all_deal_category($config['per_page'], $this->uri->segment(3));
     $data['all_link'] = $this->pagination->create_links();
     $data['title'] = 'Deal Category';
     $data['content'] = 'deal_category/deal_category_list';
     $this->load->view('template', $data, '');
 }
コード例 #16
0
ファイル: wishlist.php プロジェクト: quachvancam/sugardating
 function search($userID)
 {
     $kw = $this->input->post('keyword');
     if ($kw == "") {
         redirect(base_url() . index_page() . 'wishlist/index/' . $userID);
     }
     $data['wishlist'] = $this->wishlist_model->loadAllWishlistName($kw, $userID);
     $data['all_link'] = "";
     $data['userid'] = $userID;
     $data['title'] = "Wishlist List";
     $data['content'] = 'wishlist/wishlist_list';
     $this->load->view('template', $data, '');
 }
コード例 #17
0
ファイル: banner.php プロジェクト: quachvancam/sugardating
 function index()
 {
     $config['base_url'] = base_url() . index_page() . '/banner/index/';
     $config['per_page'] = get_item_per_page();
     $config['uri_segment'] = 3;
     $config['total_rows'] = $this->banner_model->get_all();
     $this->pagination->initialize($config);
     $data['banners'] = $this->banner_model->load_all_banner($config['per_page'], $this->uri->segment(3));
     $data['all_link'] = $this->pagination->create_links();
     $data['title'] = 'Banner List';
     $data['content'] = 'banner/banner_list';
     $this->load->view('template', $data, '');
 }
コード例 #18
0
 public function updatePengaturan()
 {
     $this->kepalamadrasah = $_POST['pengaturan-kepala-madrasah'];
     $this->namasekolah = $_POST['pengaturan-nama-sekolah'];
     $this->alamatsekolah = $_POST['pengaturan-alamat-sekolah'];
     $this->namabendahara = $_POST['pengaturan-nama-bendahara'];
     $this->tahunajaran = $_POST['pengaturan-tahun-ajaran'];
     $biayax = $_POST['biaya-pendidikan-10'];
     $biayaxi = $_POST['biaya-pendidikan-11'];
     $biayaxii = $_POST['biaya-pendidikan-12'];
     $this->db->where('id', 1);
     $this->db->update('pengaturan', $this);
     $this->db->query("UPDATE biayapendidikan\n                      SET jumlah = CASE tingkat\n                        WHEN 10 THEN {$biayax}\n                        WHEN 11 THEN {$biayaxi}\n                        WHEN 12 THEN {$biayaxii}\n                        END\n                      WHERE tingkat IN (10,11, 12)\n                      ");
     header('location:' . base_url() . index_page() . '/pengaturan');
 }
コード例 #19
0
ファイル: blog.php プロジェクト: quachvancam/sugardating
 function index()
 {
     $user_id = $this->uri->segment(3);
     $name = $this->blog_model->load_user_name($user_id);
     $data['title'] = $name . "'s Blog";
     $config['base_url'] = base_url() . index_page() . '/blog/index/' . $user_id . '/';
     $config['per_page'] = get_item_per_page();
     $config['uri_segment'] = 4;
     $config['total_rows'] = $this->blog_model->get_all($user_id);
     $this->pagination->initialize($config);
     $data['blogs'] = $this->blog_model->load_all_blog($user_id, $config['per_page'], $this->uri->segment(4));
     $data['all_link'] = $this->pagination->create_links();
     $data['content'] = 'blog/blog_list';
     $this->load->view('template', $data, '');
 }
コード例 #20
0
ファイル: register.php プロジェクト: SelFish131/rf_office
 function referer($id = '')
 {
     ### Построение вывода
     $this->config->load('rf_settings', FALSE, TRUE);
     if ($this->config->item('REF_PAY') == false) {
         redirect('register', 'refresh');
     }
     $this->table->set_template(tpl_table());
     $this->table->add_row(lang('off_main_login'), form_input('login'), lang('off_reg_charuse'));
     $this->table->add_row(lang('off_main_passw'), form_password('password'), lang('off_reg_charuse'));
     $this->table->add_row(lang('off_acc_email'), form_input('email'), lang('off_reg_emailsample'));
     $this->table->add_row(lang('off_reg_secure'), form_input('secure'), '<img src="' . base_url() . index_page() . '/antibot">');
     $this->table->add_row(form_submit('submit', lang('off_reg_btn')), '');
     $this->data['content'] = heading(icon('48x48/add_image.png') . lang('off_reg_msgreg'), 4) . form_open('register/check') . form_hidden('refid', xss_clean($id)) . $this->table->generate() . '</form>';
     compile();
 }
コード例 #21
0
 public function uploadSiswa()
 {
     if (isset($_POST['submit'])) {
         $file = $_FILES['excel-file']['tmp_name'];
         $handle = fopen($file, "r");
         $c = 0;
         while (($filesop = fgetcsv($handle, 1000, ";")) != false) {
             $this->idkelas = $filesop[0];
             $this->nama = $filesop[1];
             // echo $this->idkelas;
             // echo $this->nama;
             $this->db->insert('siswa', $this);
         }
     }
     header('location:' . base_url() . index_page());
 }
コード例 #22
0
ファイル: b2b.php プロジェクト: quachvancam/sugardating
 function searchdetail()
 {
     $userCheck = $this->session->userdata('user');
     if ($userCheck) {
         $user = getUser();
     } else {
         $this->session->sess_destroy();
         redirect(base_url() . index_page() . 'start/');
     }
     $code = $this->input->post('code', true);
     $ID = $this->input->post('dealid', true);
     $data['deal'] = $this->b2b_model->loadDealItems($ID, $code);
     $data['id'] = $ID;
     $data['title'] = 'B2B Detail';
     $data['content'] = 'b2b/detail';
     $this->load->view('templates', $data, '');
 }
コード例 #23
0
ファイル: link.php プロジェクト: chentaoz/TourismWeb
 public function manage()
 {
     //链接列表
     $data = $this->common->setConfig($this->common->configs, array('global.css'), array($this->common->js, 'global.js'));
     $total = $this->db->count_all('link');
     $url = base_url(index_page() . '/link/manage/page/');
     $uri_segment = 4;
     $config = $this->common->pageConfig($url, $total, 15, $uri_segment);
     $this->load->library('pagination', $config);
     $this->db->order_by('id', 'desc');
     $this->db->limit($config['per_page'], $this->uri->segment($uri_segment, 0));
     $links = $this->db->get('link');
     $data['links'] = $links->result_array();
     $this->load->view('head', $data);
     $this->load->view('link_manage');
     $this->load->view('foot');
 }
コード例 #24
0
 public function session($provider)
 {
     $this->load->library('session');
     $className = 'OAuth2_Provider_' . ucfirst($provider);
     $this->load->library(strtolower($className));
     $providerClass = new $className();
     $allowedProviders = $this->config->item('oauth2');
     $providerClass->config($allowedProviders[$provider]);
     $site_url = $this->config->item('oauth_site');
     if (!$this->input->get('code')) {
         // By sending no options it'll come back here
         $url = $providerClass->authorize(array('redirect_uri' => $site_url . (index_page() ? index_page() . '/' : '') . 'oauth/session/' . $providerClass->name));
         redirect($url);
     } else {
         try {
             // Have a go at creating an access token from the code
             $token = $providerClass->access($_GET['code'], array('redirect_uri' => $site_url . (index_page() ? index_page() . '/' : '') . 'oauth/session/' . $providerClass->name));
             // Use this object to try and get some user details (username, full name, etc)
             $user = $providerClass->get_user_info($token);
             $this->load->model('sns_account_model');
             $result = $this->sns_account_model->saveUserToken($user, $providerClass->name);
             if ($result) {
                 switch ($result) {
                     case 'NON_DIRECT':
                         if (!!$this->session->userdata('sns_settings_url')) {
                             redirect($this->session->userdata('sns_settings_url'), 'refresh');
                         }
                         break;
                     default:
                         $this->sns_account_model->snsLogin($user->openid, $providerClass->name);
                         $url = 'http://' . $this->session->userdata('gateway_ip') . ':' . $this->session->userdata('gateway_port') . '/pinet/auth?token=' . $result;
                         if ($this->session->userdata('url')) {
                             $url .= '&url=' . $this->session->userdata('url');
                         }
                         redirect($url, 'refresh');
                         break;
                 }
             } else {
                 $this->log();
                 redirect();
             }
         } catch (OAuth2_Exception $e) {
             show_error('That didnt work: ' . $e);
         }
     }
 }
コード例 #25
0
 public function updateKelas()
 {
     $splitKelas = preg_split("/ /", $_POST['kelas-edit-nama']);
     $this->tingkat = $splitKelas[0];
     if (isset($splitKelas[2])) {
         $this->nama = $splitKelas[1] . " " . $splitKelas[2];
     } else {
         $this->nama = $splitKelas[1];
     }
     $this->slug = underscore($_POST['kelas-edit-nama']);
     $id = $_POST['kelas-edit-id'];
     // Database Query - Update
     $this->db->where('id', $id);
     $this->db->update('kelas', $this);
     // Back to Kelas after completed
     header('location:' . base_url() . index_page() . '/kelas');
 }
コード例 #26
0
	/**
	 * Updates a specific annotation
	 * Returns: True or False
	 */
	function SetAnnotation($AnnotationId , $AnnotationX , $AnnotationY , $AnnotationText) {
		//Log it
		$user = $this->User_model->GetUser($_SESSION['userid']);
		$annotation = $this->GetAnnotation($AnnotationId);
		$comp = $this->Comp_model->GetComp($annotation['CompId']);
		$company = $this->Comp_model->GetCompanyName($annotation['CompId']);
		$CompanyId = $this->Comp_model->GetCompany($annotation['CompId']);
		$this->Log_model->LogEvent("<strong>".$user['UserName']."</strong> updated a note on <a href='".base_url().index_page()."comps/open/".$annotation['CompId']."'><strong>".$comp['CompName']."</strong></a> <a href='".base_url().index_page()."client/open/".$CompanyId."'>[".$company."]</a>", "dash");

		//If a field is an empty string (''), it will not get updated.
		$update['AnnotationId'] = $AnnotationId;
		$update['AnnotationX'] = $AnnotationX;
		$update['AnnotationY'] = $AnnotationY;
		$update['AnnotationText'] = $AnnotationText;
		$this->compostdb->Update('Annotation', $update);
		return true;
	}
コード例 #27
0
ファイル: blog.php プロジェクト: quachvancam/sugardating
 function bloglist()
 {
     $user_id = $this->uri->segment(3);
     $name = $this->blog_model->load_user_name($user_id);
     $data['title'] = $name . "'s Blog";
     $config['base_url'] = base_url() . index_page() . '/blog/blog_list/' . $user_id . '/' . $name . '/';
     $config['per_page'] = 5;
     $config['uri_segment'] = 5;
     $config['total_rows'] = $this->blog_model->get_all($user_id);
     $this->pagination->initialize($config);
     $data['blogs'] = $this->blog_model->load_all_blog($user_id, $config['per_page'], $this->uri->segment(5));
     $data['all_link'] = $this->pagination->create_links();
     $user = new stdClass();
     $user->id = $user_id;
     $data['user'] = $user;
     $data['content'] = 'blog/list';
     $this->load->view('templates', $data, '');
 }
コード例 #28
0
 function __construct()
 {
     parent::Controller();
     // Libreria personalizada que hicimos previamente para integrar la clase NuSoap con CI
     $this->load->library('nu_soap');
     // $this->load->model('citas/citas_model');
     //$this->load->helper('array');
     // $this->load->helper('intervalos');
     //$this->load->helper('datos_listas');
     // Instanciamos la clase servidor de nusoap
     $this->NuSoap_server = new nusoap_server();
     // Creamos el End Point, es decir, el lugar donde la petición cliente va a buscar la estructura del WSDL
     // aunque hay que recordar que nusoap genera dinámicamente dicha estructura XML
     $end_point = base_url() . index_page() . '/servidor_nusoap/index/wsdl';
     // Indicamos cómo se debe formar el WSDL
     $this->NuSoap_server->configureWSDL('UsuariosWSDL', 'urn:UsuariosWDSL', $end_point, 'rpc');
     $this->NuSoap_server->wsdl->addComplexType('Usuarios', 'complexType', 'array', '', 'SOAP-ENC:Array', array('id' => array('name' => 'id', 'type' => 'xsd:int'), 'nombre' => array('name' => 'nombre', 'type' => 'xsd:string'), 'apellidos' => array('name' => 'apellidos', 'type' => 'xsd:string')));
     $this->NuSoap_server->register('Servidor_nusoap..obtenerUsuario', array('id' => 'xsd:string', 'documento' => 'xsd:string'), array('return' => 'tns:Usuarios'), 'urn:UsuariosWSDL', 'urn:UsuariosWSDL#obtenerUsuario', 'rpc', 'encoded', "Provee el nombre completo de un usuario del cual se conoce su ID.");
 }
コード例 #29
0
ファイル: comment_model.php プロジェクト: rtraction/Compost
	/**
	 * Creates a comment associated with the specific annotation given
	 * Returns: The new CommentId
	 */
	function NewComment($AnnotationId , $UserId , $CommentBody , $CommentTimestamp, $CommentRating ) {
		$newcomment = array(
			'AnnotationId' => $AnnotationId,
			'UserId' => $UserId,
			'CommentBody' => $CommentBody,
			'CommentTimestamp' => $CommentTimestamp,
			'CommentRating' => $CommentRating,
		);
		
		//Log it
		$annotation = $this->Annotation_model->GetAnnotation($AnnotationId);
		$user = $this->User_model->GetUser($UserId);
		$comp = $this->Comp_model->GetComp($annotation['CompId']);
		$company = $this->Comp_model->GetCompanyName($annotation['CompId']);
		$CompanyId = $this->Comp_model->GetCompany($annotation['CompId']);
		$this->Log_model->LogEvent("<strong>".$user['UserName']."</strong> commented on a note for <a href='".base_url().index_page()."discussion/open/".$annotation['CompId']."#".$AnnotationId."'><strong>".$comp['CompName']."</strong></a> <a href='".base_url().index_page()."client/open/".$CompanyId."'>[".$company."]</a>", "dash");
		
		
		return $this->compostdb->Insert('Comment', $newcomment);
	}
コード例 #30
0
ファイル: Siswa.php プロジェクト: sendz/aplikasi-keuangan
 public function page()
 {
     $config = array();
     $config['base_url'] = base_url() . index_page() . "/siswa/page";
     $config['total_rows'] = $this->model_siswa->countSiswa();
     $config['per_page'] = 20;
     $config['uri_segment'] = 3;
     // pagination styling
     $config['full_tag_open'] = "<ul class='pagination noprint'>";
     $config['full_tag_close'] = "</ul>";
     $config['first_link'] = "Awal";
     $config['last_link'] = "Akhir";
     $config['first_tag_open'] = "<li class='waves-effect'>";
     $config['first_tag_close'] = "</li>";
     $config['last_tag_open'] = "<li class='waves-effect'>";
     $config['last_tag_close'] = "</li>";
     $config['next_tag_open'] = "<li class='waves-effect'>";
     $config['next_tag_close'] = "</li>";
     $config['prev_tag_open'] = "<li class='waves-effect'>";
     $config['prev_tag_close'] = "</li>";
     $config['cur_tag_open'] = "<li class='active'><a href='#'>";
     $config['cur_tag_close'] = "</a></li>";
     $config['num_tag_open'] = "<li class='waves-effect'>";
     $config['num_tag_close'] = "</li>";
     $this->pagination->initialize($config);
     $page = $this->uri->segment(3) ? $this->uri->segment(3) : 0;
     $data['siswa'] = $this->model_siswa->pageSiswa($config['per_page'], $page);
     $data['links'] = $this->pagination->create_links();
     # code...
     // Get list of Kelas from DB
     $data['kelas'] = $this->model_kelas->namaKelas();
     $data['editkelas'] = $this->model_kelas->namaKelas();
     $data['kelas2'] = $this->model_kelas->namaKelas();
     // $data['siswa']  = $this->model_siswa->listSiswa();
     $data['pengaturan'] = $this->model_pengaturan->listPengaturan();
     // Views
     $this->load->view('head', $data);
     $this->load->view('nav', $data);
     $this->load->view('siswa', $data);
     $this->load->view('foot');
 }