function showProvider($clsRpt, $provider, $lProviderID) { //-------------------------------------------------- // provider section //-------------------------------------------------- openBlock('Funding Provider', strLinkEdit_GrantProvider($lProviderID, 'Edit Provider Record', true) . ' ' . strLinkRem_Provider($lProviderID, 'Remove Provider', true, true)); echoT($clsRpt->openReport() . $clsRpt->openRow() . $clsRpt->writeLabel('Funder/Provider ID:') . $clsRpt->writeCell(str_pad($lProviderID, 5, '0', STR_PAD_LEFT)) . $clsRpt->closeRow() . $clsRpt->openRow() . $clsRpt->writeLabel('Name:') . $clsRpt->writeCell(htmlspecialchars($provider->strGrantOrg)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Address:') . $clsRpt->writeCell($provider->strAddress) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Phone:') . $clsRpt->writeCell(htmlspecialchars($provider->strPhone)) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Cell:') . $clsRpt->writeCell(htmlspecialchars($provider->strCell)) . $clsRpt->closeRow()); if ($provider->strEmail == '') { $strOut = ' '; } else { $strOut = mailto($provider->strEmail, htmlspecialchars($provider->strEmail)); } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Email:') . $clsRpt->writeCell($strOut) . $clsRpt->closeRow()); if ($provider->strWebSite == '') { $strOut = ' '; } else { if (!strtoupper(substr($provider->strWebSite, 0, 4)) == 'HTTP') { $provider->strWebSite = 'http://' . $provider->strWebSite; } $strOut = '<a target="_blank" href="' . prep_url($provider->strWebSite) . '">' . htmlspecialchars($provider->strWebSite) . '</a>'; } echoT($clsRpt->openRow() . $clsRpt->writeLabel('Web:') . $clsRpt->writeCell($strOut) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Notes:') . $clsRpt->writeCell(nl2br(htmlspecialchars($provider->strNotes))) . $clsRpt->closeRow()); echoT($clsRpt->openRow() . $clsRpt->writeLabel('Attributed to:') . $clsRpt->writeCell(htmlspecialchars($provider->strAttributedTo)) . $clsRpt->closeRow()); echoT($clsRpt->closeReport()); closeBlock(); }
function qry($mb_id) { if (!IS_MEMBER) { alert_close("회원만 이용하실 수 있습니다."); } $member = unserialize(MEMBER); if (!$member['mb_open'] && !SU_ADMIN && $member['mb_id'] != $mb_id) { alert_close("자신의 정보를 공개하지 않으면 다른분의 정보를 조회할 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다."); } $mb = $this->Basic_model->get_member($mb_id, "mb_id, mb_level, mb_point, mb_homepage, mb_open, mb_nick, mb_datetime, mb_today_login, mb_profile"); if (!isset($mb['mb_id'])) { alert_close("회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다."); } if (!$mb['mb_open'] && !SU_ADMIN && $member['mb_id'] != $mb_id) { alert_close("정보공개를 하지 않았습니다."); } $name = $this->config->item('cf_use_nick') && $mb['mb_nick'] ? $mb['mb_nick'] : $mb['mb_name']; $name = get_sideview($mb['mb_id'], $name); // 회원가입후 몇일째인지? + 1 은 당일을 포함한다는 뜻 $query = $this->db->query("select (TO_DAYS('" . TIME_YMDHIS . "') - TO_DAYS('" . $mb['mb_datetime'] . "') + 1) as days"); $row = $query->row_array(); $mb_reg_after = $row['days']; $mb_homepage = prep_url($mb['mb_homepage']); $mb_profile = $mb['mb_profile'] ? conv_content($mb['mb_profile'], FALSE) : "소개 내용이 없습니다."; $mb_join_date = $member['mb_level'] >= $mb['mb_level'] ? substr($mb['mb_datetime'], 0, 10) . " (" . $mb_reg_after . " 일)" : "알 수 없음"; $mb_last_login = $member['mb_level'] >= $mb['mb_level'] ? $mb['mb_today_login'] : "******"; $head = array('title' => $mb['mb_nick'] . "님의 자기소개"); $data = array('name' => $name, 'profile' => $mb_profile, 'homepage' => $mb_homepage, 'point' => number_format($mb['mb_point']), 'join_date' => $mb_join_date, 'last_login' => $mb_last_login); widget::run('head', $head); $this->load->view('member/profile', $data); widget::run('tail'); }
function updateRecord($slideshowimage) { $data = array(); $data['alt'] = $this->input->post('alt', TRUE); $data['link'] = prep_url($this->input->post('link', TRUE)); $data['image_active'] = 1; $data['new_window'] = $this->input->post('new_window', TRUE); //Upload Image $config = array(); $config['upload_path'] = $this->config->item('SLIDESHOW_IMAGE_PATH'); $config['allowed_types'] = '*'; $config['overwrite'] = FALSE; $this->load->library('upload', $config); if (count($_FILES) > 0) { //Check For Vaild Image Upload if ($_FILES['image']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['image']['tmp_name'])) { if (!$this->upload->do_upload('image')) { show_error($this->upload->display_errors('<p class="err">', '</p>')); return FALSE; } else { //$data = array(); $upload_data = $this->upload->data(); $data['slideshow_image'] = $upload_data['file_name']; //delete the image $path = $this->config->item('SLIDESHOW_IMAGE_PATH'); $filename = $path . $slideshowimage['slideshow_image']; if (file_exists($filename)) { @unlink($filename); } } } } $this->db->where('slideshow_image_id', $slideshowimage['slideshow_image_id']); $this->db->update('slideshow_image', $data); }
public function ajaxDashboard() { $all_websites = $this->model_front->get_all_websites(); $count_websites = $this->model_front->count_all_websites(); $data = array(); $no = $_POST['start']; foreach ($all_websites->result() as $row) { /*$domain = new Whois($row->w_url_rw); $date_register = $domain->info();*/ $no++; $list = array(); $list[] = $row->w_id; $list[] = $row->w_title; $list[] = '<a href="' . prep_url($row->w_url_rw) . '" target="_blank">' . $row->w_url_rw . '</a>'; $list[] = $this->input->valid_ip(gethostbyname($row->w_url_rw)) ? gethostbyname($row->w_url_rw) : "ADRESSE IP NON VALIDE"; $list[] = $row->c_title; $list[] = $row->l_title; $list[] = isset($date_register[0]) ? $date_register[0] : ""; $list[] = isset($date_register[1]) ? $date_register[1] : ""; $list[] = '<a class="access-ftp" href="#view-ftp" data-toggle="modal" data-target="#view-ftp" data-id="' . $row->w_id . '">Access FTP</a>'; $list[] = '<a class="access-sql" href="#view-database" data-toggle="modal" data-target="#view-database" data-id="' . $row->w_id . '">Access SQL</a>'; $list[] = '<a class="access-back-office" href="#view-backoffice" data-toggle="modal" data-target="#view-backoffice" data-id="' . $row->w_id . '">Access Back office</a>'; $list[] = '<a class="email" href="#email" data-toggle="modal" data-target="#email">Email</a>'; $list[] = '<a id="edit-dashboard" href="' . site_url('dashboard/edit-website/' . $row->w_id) . '">Edit</a>'; $list[] = '<a id="delete-dashboard" href="' . site_url('dashboard/delete-website/' . $row->w_id) . '">Delete</a>'; $data[] = $list; } $output = array("draw" => $_POST['draw'], "recordsTotal" => $all_websites->num_rows(), "recordsFiltered" => $count_websites->num_rows(), "data" => $data); echo json_encode($output); }
/** * banner url 이동 관련 함수입니다 */ public function banner($ban_id = 0) { // 이벤트 라이브러리를 로딩합니다 $eventname = 'event_gotourl_banner'; $this->load->event($eventname); // 이벤트가 존재하면 실행합니다 Events::trigger('before', $eventname); $ban_id = (int) $ban_id; if (empty($ban_id) or $ban_id < 1) { show_404(); } $this->load->model(array('Banner_model')); $banner = $this->Banner_model->get_one($ban_id); if (!element('ban_id', $banner)) { show_404(); } if (!element('ban_activated', $banner)) { show_404(); } if (!element('ban_url', $banner)) { show_404(); } if (!$this->session->userdata('banner_click_' . $ban_id)) { $this->session->set_userdata('banner_click_' . $ban_id, '1'); $this->Banner_model->update_plus($ban_id, 'ban_hit', 1); } // 이벤트가 존재하면 실행합니다 Events::trigger('after', $eventname); redirect(prep_url(element('ban_url', $banner))); }
function get_url() { if (!empty($this->link)) { return prep_url($this->link); } return site_url('news/' . $this->slug); }
/** * Smarty {url} function plugin * * Type: function * Name: url * @author: Trimo * @mail: trimo.1992[at]gmail[dot]com */ function smarty_function_url($params, &$smarty) { if (!function_exists('current_url')) { if (!function_exists('get_instance')) { $smarty->trigger_error("url: Cannot load CodeIgniter"); return; } $CI =& get_instance(); $CI->load->helper('url'); } if ($params['type'] == 'string') { return uri_string(); } elseif ($params['type'] == 'anchor' && isset($params['url'])) { return anchor($params['url'], $params['text'], $params['attr']); } elseif ($params['type'] == 'safemail' && isset($params['url'])) { return safe_mailto($params['url'], $params['text'], $params['attr']); } elseif ($params['type'] == 'mail' && isset($params['url'])) { return mailto($params['url'], $params['text'], $params['attr']); } elseif ($params['type'] == 'autolink' && isset($params['url'])) { return auto_link($params['url'], isset($params['mode']) ? $params['mode'] : 'both', $params['new'] == 1 ? TRUE : FALSE); } elseif ($params['type'] == 'urltitle' && isset($params['title'])) { return url_title($params['title'], isset($params['mode']) ? $params['mode'] : 'dash', $params['lower'] == 1 ? TRUE : FALSE); } elseif ($params['type'] == 'prep' && isset($params['url'])) { return prep_url($params['url']); } elseif ($params['type'] == 'current') { return current_url(); } elseif ($params['type'] == 'site') { return site_url($params['url']); } else { return base_url(); } }
public function post($year = NULL, $month = NULL, $day = NULL, $url_title = NULL) { $this->load->module_model('blog', 'comments_model', 'comments'); $this->load->module_model('blog', 'users_model', 'users'); if ($data['post'] = $this->blog->get_post_by_url($year, $month, $day, $url_title)) { $data['post']['url'] = post_url($data['post']['url_title'], $data['post']['date_posted']); $data['post']['display_name'] = $this->users->get_user_display_name($data['post']['author']); if ($data['post']['allow_comments'] == 1) { $this->comment($data['post']['id'], $data['post']['url']); } $data['comments'] = $this->comments->get_comments($data['post']['id']); if ($data['comments'] != "") { foreach ($data['comments'] as $key => $comment) { $data['comments'][$key]['content'] = parse_bbcode(nl2br(parse_smileys($comment['content'], base_url() . 'application/views/admin/static/javascript/tiny_mce/plugins/emotions/img/'))); if ($comment['user_id'] != "") { $website = $this->users->get_user_website($comment['user_id']); $display_name = $this->users->get_user_display_name($comment['user_id']); $data['comments'][$key]['author'] = '<a href="' . prep_url($website) . '" target="_blank">' . $display_name . '</a>'; } else { if ($comment['author_website'] != "") { $data['comments'][$key]['author'] = '<a href="' . prep_url($comment['author_website']) . '" target="_blank">' . $comment['author'] . '</a>'; } } } } $this->_template['page'] = 'blog/single_post'; } else { $this->_template['page'] = 'errors/404'; } $this->system_library->load($this->_template['page'], $data); }
function link_to_long($str, $message = 'Click here', $len = 15) { $class = ''; if (strlen($str) > $len) { $class = ' class="link_to_long" title="' . $str . '"'; } return "<a href='" . prep_url($str) . "' target='_blank'" . $class . ">" . (strlen($str) > $len ? $message : $str) . "</a>"; }
/** * Constructor */ public function __construct() { $this->EE =& get_instance(); $this->EE->load->helper('url'); $url = $this->EE->TMPL->fetch_param('url'); $type = $this->EE->TMPL->fetch_param('type') ? intval($this->EE->TMPL->fetch_param('type')) : 301; redirect(prep_url($url), 'location', $type); }
function update() { $data['url'] = prep_url($this->input->post('url')); $data['title'] = 'Add Bookmark'; $data['main_view'] = 'bookmark/add_bookmark'; $data['user'] = $_SESSION['logged_in_user']; $this->load->vars($data); $this->load->view('template'); }
function redirect_external($uri = '', $method = 'location', $http_response_code = 302) { switch ($method) { case 'refresh': header("Refresh:0;url=" . prep_url($uri)); break; default: header("Location: " . prep_url($uri), TRUE, $http_response_code); break; } exit; }
/** * Perform lookup * * @access public * @return mixed **/ public function lookup($domain) { $domain = prep_url($domain); $domain = parse_url($domain); $domain = preg_replace('/^www\\./', '', $domain['host']); // -------------------------------------------------------------------------- $_ch = curl_init(); curl_setopt($_ch, CURLOPT_URL, 'http://www.freedomainwhois.com/src/webservice.php'); curl_setopt($_ch, CURLOPT_POST, TRUE); curl_setopt($_ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($_ch, CURLOPT_POSTFIELDS, array('action' => 'whois', 'f_domainname' => $domain)); $result = curl_exec($_ch); curl_close($_ch); return json_decode($result); }
public function go($banner_id = null) { $banner_id = (is_numeric($banner_id) and $banner_id > 0) ? intval($banner_id) : 0; if (!$banner_id or !($banner_obj = $this->Banners_model->get($banner_id))) { show_404(); } // add info to statistic $this->load->model('banners/models/Banners_stat_model'); $this->Banners_stat_model->add_hit($banner_id); $stat = $this->Banners_model->get_banner_overall_stat($banner_id); $this->Banners_model->save_banner_clicks($banner_id, $stat["stat_clicks"] + 1); $url = isset($banner_obj['link']) ? prep_url($banner_obj['link']) : ''; if ($url) { redirect($url); } }
function get_valtype($val, $type, $mode = 'grid') { $ci =& get_instance(); switch ($type) { case "yes_no": return !$val ? img('public/img/icons/decline_inline.gif') : img('public/img/icons/accept_inline.gif'); break; case "email": return $val ? safe_mailto($val) : ''; break; case "url": return $val ? anchor(prep_url($val), lang('GO_LINK'), 'target="_blank"') : ''; break; default: return $val; } }
public function Go() { if (!$this->uri->segment(1)) { redirect(base_url()); } else { $code = $this->uri->segment(1); $this->load->model('Urls_model'); $result = $this->Urls_model->Fetch($code); if ($result) { redirect(prep_url($result)); } else { $data['error'] = "URL não localizada."; $data['short_url'] = null; $this->load->view('home', $data); } } }
/** * 修改个人资料 */ public function profile() { $this->load->helper('form'); $this->load->library('form_validation'); $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); $this->form_validation->set_rules('qq', 'QQ', 'trim|integer'); if ($this->form_validation->run() == FALSE) { //form failed $data = $this->user_m->get_user_byid($this->session->userdata('uid')); $data['site_title'] = '修改资料'; $this->load->view('user_profile', $data); } else { //form success $data = array('email' => $this->input->post('email'), 'qq' => $this->input->post('qq'), 'location' => htmlspecialchars($this->input->post('location')), 'homepage' => prep_url(htmlspecialchars($this->input->post('homepage'))), 'signature' => htmlspecialchars($this->input->post('signature')), 'introduction' => htmlspecialchars($this->input->post('introduction'))); $this->user_m->update($this->session->userdata('uid'), $data); redirect('settings/profile'); } }
public function index() { $client = (array) $this->client_model->get_client(); if (count($client) > 0) { $i = 1; $arr_client = array(); foreach ((array) $client as $row) { if ($i % 4 == 0) { $row->break = TRUE; } else { $row->break = FALSE; } $row->client_website = prep_url($row->client_website); $arr_client[] = (array) $row; $i++; } } $this->THEMEVARS['client'] = $arr_client; $this->THEMEVARS['page'] = 'templates/client.html'; $this->twig->display($this->layout, $this->THEMEVARS); }
public function create($short_url = NULL) { $this->data['page_title'] = 'Сокращение URL'; $this->form_validation->set_rules('shortener', 'url', 'trim|required|valid_url|min_length[5]|max_length[100]'); if ($this->form_validation->run()) { $url = prep_url($this->input->post('shortener')); $linkLength = $this->siteOptions['link_length']; $existingAlias = $this->_aliasUrl($url); if (!$existingAlias) { $alias = random_string('alnum', $linkLength); while ($this->_aliasExist($alias)) { $alias = random_string('alnum', $linkLength); } $this->_saveUrl($url, $alias); $short_url = $alias; } else { $short_url = $existingAlias; } $this->data['item'] = base_url($this->config->item('link_slug') . '/' . $short_url); } $this->load_theme('shortness/index', $this->data); }
public function index() { if (!$this->uri->segment(1)) { redirect(base_url()); } else { $url_code = $this->uri->segment(1); $this->load->model('Urls_model'); $query = $this->Urls_model->fetch_url($url_code); if ($query->num_rows() == 1) { foreach ($query->result() as $row) { $url_address = $row->url_address; } redirect(prep_url($url_address)); } else { $page_data = array('success_fail' => null, 'encoded_url' => false); $this->load->view('common/header'); $this->load->view('nav/top_nav'); $this->load->view('create/create', $page_data); $this->load->view('common/footer'); } } }
public function add_author_submit() { $this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>'); $this->form_validation->set_rules('first_name', 'First name', 'trim|required'); $this->form_validation->set_rules('last_name', 'Last name', 'trim'); $this->form_validation->set_rules('display_as', 'Display as', 'trim'); $this->form_validation->set_rules('personal_page', 'Personal page', 'trim'); $this->form_validation->set_rules('google_plus', 'Google plus profile', 'trim|is_natural'); $this->form_validation->set_rules('facebook', 'Facebook profile', 'trim'); $this->form_validation->set_rules('twitter', 'Twitter profile', 'trim'); $this->form_validation->set_rules('linkedin', 'Linkedin', 'trim'); $this->form_validation->set_rules('about', 'About', 'trim'); if ($this->form_validation->run() === FALSE) { $this->load->view('authors_add_view'); } else { $created_by = $this->session->userdata('iduser'); $first_name = strip_tags($this->input->post('first_name')); $last_name = strip_tags($this->input->post('last_name')); $display_as = strip_tags($this->input->post('display_as')); $personal_page = prep_url($this->input->post('personal_page')); $google_plus = strip_tags($this->input->post('google_plus')); $facebook = strip_tags($this->input->post('facebook')); $twitter = strip_tags($this->input->post('twitter')); $linkedin = strip_tags($this->input->post('linkedin')); $about = $this->input->post('about'); if (!empty($display_as)) { $url = url_title($display_as, 'dash'); } else { $url = url_title($first_name . '-' . $last_name, 'dash'); } $this->load->model('authors_model'); if ($this->authors_model->insert(array('first_name' => $first_name, 'last_name' => $last_name, 'display_as' => $display_as, 'personal_page' => $personal_page, 'google_plus' => $google_plus, 'facebook' => $facebook, 'twitter' => $twitter, 'linkedin' => $linkedin, 'about' => $about, 'url' => $url, 'created_by' => $created_by))) { $this->cache->delete('articles_authors'); redirect(site_url('articles/authors'), 'refresh'); } } }
public function profile() { $user = \App::user(); if ($this->input->post()) { //rules blank $ruleManager = $this->container->get('user.rule_manager'); $this->form_validation->set_rules($ruleManager->getRules(array('firstname', 'lastname', 'dateOfBirth', 'gender', 'phoneNumber', 'mobileNumber', 'address', 'biography', 'website', 'facebookId', 'gplusId', 'twitterId'))); $this->form_validation->set_rules('current_password', 'Password', 'trim|required|callback_confirmPassword'); if ($this->form_validation->run($this)) { $user->setFirstname($this->input->post('firstname')); $user->setLastname($this->input->post('lastname')); if ($this->input->post('dateOfBirth')) { $user->setDateOfBirth(new \DateTime($this->input->post('dateOfBirth'))); } $user->setGender($this->input->post('gender')); $user->setPhoneNumber($this->input->post('phoneNumber')); $user->setMobileNumber($this->input->post('mobileNumber')); $user->setAddress($this->input->post('address')); $user->setBiography($this->input->post('biography')); $user->setWebsite(prep_url($this->input->post('website'))); $user->setFacebookId(prep_url($this->input->post('facebookId'))); $user->setGplusId(prep_url($this->input->post('gplusId'))); $user->setTwitterId(prep_url($this->input->post('twitterId'))); $this->container->get('user.user_manager')->updateUser($user); if ($user->getId()) { $this->session->setFlashMessage('feedback', "Profile updated successfully.", 'success'); redirect('admin/dashboard'); } else { $this->session->setFlashMessage('feedback', "Unable to update profile. Please try again.", 'error'); redirect('admin/user/profile'); } } } $this->breadcrumbs->push('Profile', current_url()); $this->templateData['pageTitle'] = 'Profile'; $this->templateData['user'] = $user; $this->templateData['content'] = 'user/profile'; $this->load->view('backend/main_layout', $this->templateData); }
</div> </div> <p style="float: none"> <?php echo $person->location; ?> <?php if ($person->location && $person->web) { ?> <span class="divider"> · </span> <?php } ?> <a href="<?php echo prep_url($person->web); ?> " target="_blank"><?php echo $person->web; ?> </a> </p> <?php if ($show_user) { ?> <p> </p><?php } else { ?> <div style="height: 10px"></div><?php }
function get_comment($page_id = 0) { $page_id = preg_replace('/[^0-9]+/', '', $page_id); $query = $this->db->get_where('page_comment', array('page_id' => $page_id, 'page_comment_status' => '1')); $q = $query->result_array(); $c = ''; if (is_array($q) && count($q) > 0) { foreach ($q as $v) { $c .= "\n" . '<div class="comment"><a name="cmnt' . $v['page_comment_id'] . '"></a>'; $c .= "\n" . '<p class="comment"><img class="gravatar" src="http://www.gravatar.com/avatar/' . md5(strtolower(trim($v['email']))) . '?s=40&d=mm" />' . nl2br($v['comment']) . '</p>'; $c .= "\n" . '<p class="commenter"><a href="' . current_url() . '#cmnt' . $v['page_comment_id'] . '"><span> ' . date("d/m/y h:i:s", strtotime($v['time'])) . '</span></a><span>|</span>'; $c .= "\n" . '<a rel="external nofollow" href="' . prep_url($v['url']) . '#" target="_blank">' . $v['name'] . '</a></p>'; $c .= "\n" . '</div>'; } } echo $c; }
function _websites_create() { $data = ''; $this->load->library('form_validation'); $val = array(array('field' => 'websites_name', 'label' => 'Website Name', 'rules' => 'trim|required'), array('field' => 'websites_url', 'label' => 'Website Url', 'rules' => 'trim|required'), array('field' => 'websites_status', 'label' => 'Website Status', 'rules' => 'trim|required')); $this->form_validation->set_rules($val); if ($this->form_validation->run() == FALSE) { if (!validation_errors() == '' && $this->input->post('create') == 'Create') { $msg = array('error' => validation_errors()); set_global_messages($msg, 'error'); } } else { $sql = array('websites_name' => set_value('websites_name'), 'websites_url' => prep_url(trim(set_value('websites_url'), '/')), 'websites_status' => set_value('websites_status')); $this->cf_websites_model->save($sql); } $assets = array(); //load all required css //if media type not defined, screen is default. //$assets['css'] = array('admin','swiff','box','upload'); $assets['css'] = array('all' => array('admin', 'group', 'box')); //load all required js $assets['js'] = array(); $this->cf_asset_lib->load($assets); //--- $html_string = $this->load->view('admin/setting/websites_create_view', $data, true); //Get view data in place of sending to browser. $this->cf_process_lib->view($html_string); }
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div id="navbar" class="navbar-collapse collapse"> <?php $links = array(anchor(base_url(), "<i class='fa fa-home'></i> Início"), anchor(base_url("sobre"), "Sobre"), anchor(base_url("concursos"), "Concursos"), anchor(base_url("questoes"), "Questões"), anchor(base_url("arquivos"), "Arquivos"), anchor("http://vencendoconcursos.com.br", "Blog")); echo ul($links, array("class" => "nav nav-justified")); ?> </div> </div> </nav> <?php echo $this->load->view($view); ?> <hr> <footer class="text-center"> <p>© Vencendo Concursos Todos direitos reservados 2015</p> Desenvolvido por <?php echo anchor(prep_url("www.joelmedeiros.com.br"), "Joel Medeiros", "target = '_blank'"); ?> <hr> </footer> </div> </body> </html>
public function test_prep_url() { $this->assertEquals('http://codeigniter.com', prep_url('codeigniter.com')); $this->assertEquals('http://www.codeigniter.com', prep_url('www.codeigniter.com')); }
/** * Get plugin info * * Check for a plugin and get it's information * * @access private * @param string plugin filename * @return mixed array of plugin data */ function _get_plugin_info($filename = '') { if (!$filename) { return FALSE; } $path = PATH_PI . 'pi.' . $filename . '.php'; if (!file_exists($path)) { $path = PATH_THIRD . $filename . '/pi.' . $filename . '.php'; if (!file_exists($path)) { return FALSE; } } if ($temp = $this->_magpie_check($filename, $path)) { $plugin_info = $temp; } include_once $path; if (!isset($plugin_info) or !is_array($plugin_info)) { return FALSE; } // We need to clean up for display, might as // well do it here and keep the view tidy foreach ($plugin_info as $key => $val) { if ($key == 'pi_author_url') { $qm = $this->config->item('force_query_string') == 'y' ? '' : '?'; $val = prep_url($val); $val = anchor($this->functions->fetch_site_index() . $qm . 'URL=' . $val, $val); } else { if ($key == 'pi_usage') { $val = nl2br(htmlspecialchars($val)); } } $plugin_info[$key] = $val; } return $plugin_info; }
<div class="col-sm-12"> <ul class="list-inline"> <li><span><a href="<?php echo prep_url('facebook.com/purnimapro'); ?> " title="Like Us on Facebook" target="_blank"><i class="fa fa-facebook fa-lg"></i></a></span></li> <li><span><a href="<?php echo prep_url('twitter.com/#!/purnimapro'); ?> " title="Follow Us on Twitter" target="_blank"><i class="fa fa-twitter fa-lg"></i></a></span></li> <li><span><a href="<?php echo prep_url('plus.google.com/109561002530709472999'); ?> " title="Follow Us on GooglePlus" target="_blank"><i class="fa fa-google-plus fa-lg"></i></a></span></li> <li><span><a href="<?php echo prep_url('linkedin.com/company/purnima-progressive'); ?> " title="Connect with us on LinkedIn" target="_blank"><i class="fa fa-linkedin fa-lg"></i></a></span></li> </ul> </div> </div> <div class="row zero"> <div class="col-sm-12" id="hlinks"> <ul class="list-inline"> <li><a href="<?php echo site_url('contacts/contact'); ?> " title="Purnima Progressive - Contact">Contact</a></li> <li><a href="<?php echo site_url('contacts/enquiry');
/** * Update an existing comment * * @access public * @param int $id The ID of the comment to update * @param array $input The array containing the data to update * @return void */ public function update($id, $input) { $this->load->helper('date'); return parent::update($id, array('name' => isset($input['name']) ? ucwords(strtolower(strip_tags($input['name']))) : '', 'email' => isset($input['email']) ? strtolower($input['email']) : '', 'website' => isset($input['website']) ? prep_url(strip_tags($input['website'])) : '', 'comment' => htmlspecialchars($input['comment'], NULL, FALSE), 'parsed' => parse_markdown(htmlspecialchars($input['comment'], NULL, FALSE)))); }