Hacked By AnonymousFox

Current Path : /home/missmand/public_html/js/lightbox/
Upload File :
Current File : /home/missmand/public_html/js/lightbox/link.tar

plugin.min.js000064400000010614151775335630007203 0ustar00tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/</.test(b)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();window.setTimeout(function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})},0)}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www\./i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});category_form.class.php000064400000004126152004370770011231 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link category form class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

/**
 * Edit/create a LinkCategory.
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class CategoryForm extends \FormValidator
{

    protected $category;

    function __construct($form_name = 'category', $method = 'post', $action = '', $target = '', $attributes = null, $track_submit = true)
    {
        parent::__construct($form_name, $method, $action, $target, $attributes, $track_submit);
    }
    
    /**
     *
     * @return object
     */
    public function get_category()
    {
        return $this->category;
    }

    public function set_category($value)
    {
        $this->category = $value;
    }
    /**
     *
     * @param \Link\LinkCategory $category 
     */
    function init($category = null)
    {
        $this->set_category($category);
        
        $defaults = array();
        $defaults['category_title'] = $category->category_title;
        $defaults['category_description'] =  $category->description;
        
        $this->addElement('hidden', 'c_id', $category->c_id);
        $this->addElement('hidden', 'id', $category->id);
        $this->addElement('hidden', 'session_id', $category->session_id);

        $form_name = $category->id ? get_lang('ModifyCategory') : get_lang('AddCategory');
        $this->add_header($form_name);


        $this->add_textfield('category_title', get_lang('Title'));
        $this->addRule('category_title', get_lang('Required'), 'required');
        
        $this->addElement('textarea', 'category_description', get_lang('Description'));
        $this->addElement('button', 'save', get_lang('Save'), array('class' => 'btn save'));
        $this->setDefaults($defaults);
    }
    
    function update_model()
    {
        $values = $this->exportValues();
        $category = $this->get_category();
        $category->category_title = $values['category_title'];
        $category->description = $values['category_description'];
    }
}
ajax_controller.class.php000064400000015037152004370770011562 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link controller (ajax) script
 * @package chamilo.link
 */
/**
 * Init
 */
namespace Link;

use \Model\Course;
use \CourseDescription;
use \CourseDescriptionRoutes;
use \Display;
use \Template;
use \FormValidator;
use \Security;
use \Uri;
use Header;

/**
 * Ajax controller. Dispatch request and perform required action.
 * 
 *      - delete category/link 
 *      - hide/show link
 *      - sort links/categories
 * 
 * Usage:
 * 
 *      $controller = AjaxController::instance();
 *      $controller->run();
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class AjaxController extends \Controller
{

    const ACTION_DELETE_CATEGORY = 'delete_category';
    const ACTION_HIDE_LINK = 'hide_link';
    const ACTION_SHOW_LINK = 'show_link';
    const ACTION_DELETE_LINK = 'delete_link';
    const ACTION_DELETE_BY_COURSE = 'delete_by_course';
    const ACTION_SORT_CATEGORIES = 'sort_categories';
    const ACTION_SORT_LINKS = 'sort_links';
    const ACTION_VALIDATE_LINK = 'validate_link';

    /**
     * Return the instance of the controller.
     * 
     * @return  \Link\AjaxController
     */
    public static function instance()
    {
        static $result = null;
        if (empty($result)) {
            $result = new self();
        }
        return $result;
    }

    protected function __construct()
    {
        
    }

    /**
     * Prepare the environment. Set up breadcrumps and raise tracking event. 
     */
    protected function prolog()
    {
        event_access_tool(TOOL_LINK);
    }

    public function authorize()
    {
        $authorize = api_protect_course_script();
        if (!$authorize) {
            return false;
        }

        $c_id = Request::get_c_id();
        if (empty($c_id)) {
            return false;
        }
        if (Request::is_student_view()) {
            return false;
        }
        if (!$this->is_allowed_to_edit()) {
            return false;
        }

        return true;
    }

    public function is_allowed_to_edit()
    {
        $session_id = Request::get_session_id();

        if ($session_id != 0 && api_is_allowed_to_session_edit(false, true) == false) {
            return false;
        }

//        if (!Security::check_token('get')) {
//            return false;
//        }

        if (!api_is_allowed_to_edit(false, true, true)) {
            return false;
        }
        return true;
    }

    /**
     * 
     */
    public function hide_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $c_id = Request::get_c_id();
        $id = Request::get_id();

        $success = LinkRepository::instance()->make_invisible($c_id, $id);

        $this->response($success);
    }

    /**
     * 
     */
    public function show_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $c_id = Request::get_c_id();
        $id = Request::get_id();

        $success = LinkRepository::instance()->make_visible($c_id, $id);

        $this->response($success);
    }

    /**
     * 
     */
    public function delete_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $link = (object) array();
        $link->c_id = Request::get_c_id();
        $link->id = Request::get_id();

        $success = LinkRepository::instance()->remove($link);

        $this->response($success);
    }

    /**
     * 
     */
    public function delete_category()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $category = (object) array();
        $category->c_id = Request::get_c_id();
        $category->id = Request::get_id();

        $success = LinkCategoryRepository::instance()->remove($category);

        $this->response($success);
    }
    /**
     * 
     */
    public function delete_by_course()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }
        $c_id = Request::get_c_id();
        $session_id = Request::get_session_id();

        $success_link = LinkRepository::instance()->remove_by_course($c_id, $session_id);
        $success_cat = LinkCategoryRepository::instance()->remove_by_course($c_id, $session_id);

        $this->response($success_link && $success_cat);
    }

    public function sort_categories()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $c_id = Request::get_c_id();
        $ids = Request::get_ids();
        if (empty($ids)) {
            return;
        }

        $repo = LinkCategoryRepository::instance();
        $success = $repo->order($c_id, $ids);

        $this->response($success);
    }

    public function sort_links()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $c_id = Request::get_c_id();
        $ids = Request::get_ids();
        if (empty($ids)) {
            return;
        }

        $repo = LinkRepository::instance();
        $success = $repo->order($c_id, $ids);

        $this->response($success);
    }


    public function validate_link()
    {
        $c_id = Request::get_c_id();
        $id = Request::get_id();

        $repo = LinkRepository::instance();
        $link = $repo->find_one_by_id($c_id, $id);
        $success = $link ? $link->validate() : false;
        
        $this->response($success);
    }

    function forbidden()
    {
        $this->response(false, get_lang('YouAreNotAuthorized'));
    }

    public function unknown()
    {
        $this->response(false, get_lang('UnknownAction'));
    }

    /**
     * Action exists but implementation is missing. 
     */
    public function missing()
    {
        $this->response(false, get_lang('NoImplementation'));
    }

    /**
     * Display a standard json responce.
     * 
     * @param bool $success
     * @param string $message 
     * @param object $data
     */
    public function response($success = false, $message = '', $data = null)
    {
        $message = trim($message);
        $response = (object) array();
        $response->success = $success;
        if ($message) {
            $response->message = Display::return_message($message, $success ? 'normal' : 'error');
        } else {
            $response->message = '';
        }
        $response->data = $data;
        $this->render_json($response);
    }

}
controller.class.php000064400000034330152004370770010554 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link controller script
 * @package chamilo.link
 */
/**
 * Init
 */
namespace Link;

use Security;
use Uri;
use Redirect;
use Chamilo;
use Javascript;
use Header;

/**
 * Html controller. Dispatch request and perform required action:
 * 
 *      - list
 *      - add/edit/delete link
 *      - add/edit/delete category
 *      - make visible/invisible link
 *      - go to link target
 * 
 * Note:
 * Currently some actions are only implemented in the Ajax controller.
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class Controller extends \Controller
{

    const ACTION_LISTING = 'listing';
    const ACTION_VIEW = 'view';
    const ACTION_ADD_LINK = 'add_link';
    const ACTION_EDIT_LINK = 'edit_link';
    const ACTION_DELETE_LINK = 'delete_link';
    const ACTION_MAKE_VISIBLE = 'make_visisble';
    const ACTION_MAKE_INVISIBLE = 'make_invisible';
    const ACTION_ADD_CATEGORY = 'add_category';
    const ACTION_EDIT_CATEGORY = 'edit_category';
    const ACTION_DELETE_CATEGORY = 'delete_category';
    const ACTION_GO = 'go';
    const ACTION_IMPORT_CSV = 'import_csv';
    const ACTION_EXPORT_CSV = 'export_csv';
    const ACTION_DEFAULT = 'listing';

    /**
     * 
     * @return \Link\Controller
     */
    public static function instance()
    {
        static $result = null;
        if (empty($result)) {
            $result = new self();
        }
        return $result;
    }

    public function is_allowed_to_edit()
    {
        if (Request::is_student_view()) {
            return false;
        }
        //$c_id = self::params()->get_c_id();
        //$id = self::params()->get_id();
        $session_id = Request::get_session_id();

        if ($session_id != 0 && api_is_allowed_to_session_edit(false, true) == false) {
            return false;
        }

        if (!api_is_allowed_to_edit(false, true, true)) {
            return false;
        }
        return true;
    }

    /**
     * Action to perform. 
     * Returns the request parameter.
     * 
     * @return string
     */
    public function get_action()
    {
        $result = parent::get_action();
//        if (self::params()->is_student_view()) {
//            if ($result != self::ACTION_LISTING && $result != self::ACTION_VIEW) {
//                return self::ACTION_LISTING;
//            }
//        }
        $result = $result ? $result : self::ACTION_DEFAULT;
        return $result;
    }

    public function prolog()
    {
        event_access_tool(TOOL_LINK);

        //legacy
        global $interbreadcrumb;
        $interbreadcrumb = array();
        $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Links'));

        global $current_course_tool;
        global $this_section;
        global $nameTools;
        $current_course_tool = TOOL_LINK;
        $this_section = SECTION_COURSES;
        $nameTools = get_lang('Links');
    }

    /**
     * Whether the call is authorized or not.
     * 
     * @return boolean 
     */
    public function authorize()
    {
        $authorize = api_protect_course_script();
        if (!$authorize) {
            return false;
        }

        $c_id = Request::get_c_id();
        if (empty($c_id)) {
            return false;
        }

        return true;
    }

    /**
     * Javascript used by the controller
     * 
     * @return string
     */
    public function javascript()
    {
        $src = Chamilo::url('/main/link/resources/js/main.js');
        $result = Javascript::tag($src);

        $www = Chamilo::url();
        $result .= Javascript::tag_code($code);
        return $result;
    }

    /**
     * Returns a url for an action that the controller can process
     * 
     * @param string $action
     * @param array $params
     * @return string 
     */
    public function url($action, $params = array())
    {
        $url_params = Uri::course_params();
        if ($c_id = Request::get_c_id()) {
            $url_params[Request::PARAM_C_ID] = $c_id;
        }
        if ($id = Request::get_id()) {
            $url_params[Request::PARAM_ID] = $id;
        }
        if($session_id = Request::get_session_id()){
            $url_params[Request::PARAM_SESSION_ID] = $session_id;
        }
        $url_params[Request::PARAM_ACTION] = $action;

        foreach ($params as $key => $value) {
            $url_params[$key] = $value;
        }

        $result = Uri::url('/main/link/index.php', $url_params, false);
        return $result;
    }

    public function listing()
    {
        $c_id = Request::get_c_id();
        $session_id = Request::get_session_id();

        $root = (object) array();
        $root->c_id = $c_id;
        $root->id = 0;
        $root->session_id = $session_id;
        $links = LinkRepository::instance()->find_by_category($root);

        $repo = LinkCategory::repository();
        $categories = $repo->find_by_course($c_id, $session_id);

        //$data = compact('links', 'categories');
        $data = (object) array();
        $data->categories = $categories;
        $data->links = $links;
        $this->render('index', $data);
    }

    public function add_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $link = new Link();
        $link->id = 0;
        $link->c_id = Request::get_c_id();
        $link->session_id = Request::get_session_id();
        /**
         * @todo: ensure session_id is correctly defaulted 
         */
        $action = $this->url(self::ACTION_ADD_LINK);
        $form = new LinkForm('link', 'post', $action);
        $form->init($link);

        if ($form->validate()) {
            $form->update_model();
            $repo = LinkRepository::instance();
            $success = $repo->save($link);

            $message = $success ? get_lang('LinkAdded') : get_lang('Error');

            $home = $this->url(self::ACTION_DEFAULT);
            Redirect::go($home);
        }

        global $interbreadcrumb;
        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddLink'));
        $data = (object) array();
        $data->form = $form;
        $this->render('edit_link', $data);
    }

    public function import_csv()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }               
        
        $action = $this->url(self::ACTION_IMPORT_CSV);
        $form = new UploadFileForm('import_csv', 'post', $action);
        $form->init();
        if ($form->validate()) {
            $file = $form->get_file();        
            $path = $file['tmp_name'];
            $c_id = Request::get_c_id();
            $session_id = Request::get_session_id();
            $import = new ImportCsv($c_id, $session_id, $path);
            $import->run();
            //import_csvfile();
            $home = $this->url(self::ACTION_DEFAULT);
            Redirect::go($home);
        }

        $data = (object) array();
        $data->form = $form;
        $this->render('edit_link', $data);
    }

    public function export_csv()
    {
        $c_id = Request::get_c_id();
        $session_id = Request::get_session_id();

        $root = (object) array();
        $root->c_id = $c_id;
        $root->id = 0;
        $root->session_id = $session_id;
        $links = LinkRepository::instance()->find_by_category($root);

        $repo = LinkCategory::repository();
        $categories = $repo->find_by_course($c_id, $session_id);

        $temp = Chamilo::temp_file();
        $writer = \CsvWriter::create(new \FileWriter($temp));
        $headers = array();
        $headers[] = 'url';
        $headers[] = 'title';
        $headers[] = 'description';
        $headers[] = 'target';
        $headers[] = 'category_title';
        $headers[] = 'category_description';
        $writer->put($headers);
        foreach ($links as $link) {
            $data = array();
            $data[] = $link->url;
            $data[] = $link->title;
            $data[] = $link->description;
            $data[] = $link->target;
            $data[] = '';
            $data[] = '';
            $writer->put($data);
        }
        foreach ($categories as $category) {
            foreach ($category->links as $link) {
                $data = array();
                $data[] = $link->url;
                $data[] = $link->title;
                $data[] = $link->description;
                $data[] = $link->target;
                $data[] = $category->category_title;
                $data[] = $category->description;
                $writer->put($data);
            }
        }
        
		\DocumentManager :: file_send_for_download($temp, true, get_lang('Links').'.csv');
    }

    public function delete_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        /**
         * See AjaxController 
         */
        $this->missing();
    }

    public function edit_link()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $id = Request::get_id();
        $c_id = Request::get_c_id();

        $repo = LinkRepository::instance();
        $link = $repo->find_one_by_id($c_id, $id);

        $action = $this->url(self::ACTION_EDIT_LINK);
        $form = new LinkForm('link', 'post', $action);
        $form->init($link);

        if ($form->validate()) {
            $form->update_model();
            $success = $repo->save($link);

            $message = $success ? get_lang('LinkUpdated') : get_lang('Error');

            $home = $this->url(self::ACTION_DEFAULT);
            Redirect::go($home);
        }

        global $interbreadcrumb;
        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink'));
        $data = (object) array();
        $data->form = $form;
        $this->render('edit_link', $data);
    }

    public function make_visible()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        /**
         * See AjaxController 
         */
        $this->missing();
    }

    public function make_invisible()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        /**
         * See AjaxController 
         */
        $this->missing();
    }

    public function add_category()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $category = (object) array();
        $category->id = 0;
        $category->c_id = Request::get_c_id();
        $category->session_id = Request::get_session_id();
        $category->category_title = '';
        $category->description = '';
        $category->display_order = 0;

        $action = $this->url(self::ACTION_ADD_CATEGORY);
        $form = new CategoryForm('category', 'post', $action);
        $form->init($category);

        if ($form->validate()) {
            $form->update_model();
            $repo = LinkCategoryRepository::instance();
            $success = $repo->save($category);

            $message = $success ? get_lang('CategoryAdded') : get_lang('Error');

            $home = $this->url(self::ACTION_DEFAULT);
            Redirect::go($home);
        }

        global $interbreadcrumb;
        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory'));

        $data = (object) array();
        $data->form = $form;
        $this->render('edit_category', $data);
    }

    public function edit_category()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }
        $c_id = Request::get_c_id();
        $id = Request::get_id();

        $repo = LinkCategoryRepository::instance();
        $category = $repo->find_one_by_id($c_id, $id);

        $action = $this->url(self::ACTION_EDIT_CATEGORY);
        $form = new CategoryForm('category', 'post', $action);
        $form->init($category);

        if ($form->validate()) {
            $form->update_model();
            $repo = LinkCategoryRepository::instance();
            $success = $repo->save($category);

            $message = $success ? get_lang('CategorySaved') : get_lang('Error');

            $home = $this->url(self::ACTION_DEFAULT);
            Redirect::go($home);
        }

        global $interbreadcrumb;
        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditCategory'));
        $data = (object) array();
        $data->form = $form;
        $this->render('edit_category', $data);
    }

    public function delete_category()
    {
        if (!$this->is_allowed_to_edit()) {
            $this->forbidden();
            return;
        }

        $category = (object) array();
        $category->id = Request::get_id();
        $category->c_id = Request::get_c_id();

        $success = $repo = CategoryRepo::instance()->remove($category);
        $message = $success ? get_lang('CategoryRemoved') : get_lang('Error');

        $home = $this->url(self::ACTION_DEFAULT);
        Redirect::go($home);
    }

    public function go()
    {
        $id = Request::get_id();
        $c_id = Request::get_c_id();

        $repo = LinkRepository::instance();
        $link = $repo->find_one_by_id($c_id, $id);
        $url = $link->url;

        event_link($id);

        Header::cache_control('no-store, no-cache, must-revalidate');
        Header::pragma('no-cache');
        Redirect::go($url);
    }

    /**
     * Render a template using data. Adds a few common parameters to the data array.
     * 
     * @see /main/template/default/course_description/
     * @param string $template
     * @param array $data 
     */
    protected function render($template, $data)
    {
        $data = $data ? $data : (object) array();
        
        $_user = api_get_user_info();
        $session_id = Request::get_session_id();
        $data->session_image = api_get_session_image($session_id, $_user);

        $sec_token = Security::get_token();
        $data->sec_token = $sec_token;

        $context = Uri::course_params();
        $data->root = Uri::url('/main/link/index.php', $context);

        $data->session_id = $session_id;
        $data->c_id = Request::get_c_id();
        $data->is_allowed_to_edit = $this->is_allowed_to_edit();
        parent::render("link/$template.tpl", $data);
    }

}
import_csv.class.php000064400000012412152004370770010553 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link CSV import class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

/**
 * Import a csv file into the course/session.
 * 
 * 
 *
 * @license /licence.txt
 * @author Laurent Opprecht <laurent@opprecht.info>
 */
class ImportCsv
{

    protected $c_id;
    protected $session_id;
    protected $path;
    protected $links_imported = 0;
    protected $links_skipped = 0;
    protected $update_existing_entries = false;

    public function __construct($c_id, $session_id, $path, $update_existing_entries = false)
    {
        $this->c_id = $c_id;
        $this->session_id = $session_id;
        $this->path = $path;
        $this->update_existing_entries = $update_existing_entries;
    }

    public function get_path()
    {
        return $this->path;
    }

    public function get_c_id()
    {
        return $this->c_id;
    }

    public function get_session_id()
    {
        return $this->session_id;
    }

    public function get_links_imported()
    {
        return $this->links_imported;
    }

    public function get_links_skipped()
    {
        return $this->links_skipped;
    }

    public function get_update_existing_entries()
    {
        return $this->update_existing_entries;
    }

    /**
     * Read file and returns an array filled up with its' content.
     * 
     * @return array of objects
     */
    public function get_data()
    {
        $result = array();

        $path = $this->path;
        if (!is_readable($path)) {
            return array();
        }

        $items = \Import::csv_reader($path);
        foreach ($items as $item) {
            $item = (object) $item;
            $url = isset($item->url) ? trim($item->url) : '';
            $title = isset($item->title) ? trim($item->title) : '';
            $description = isset($item->description) ? trim($item->description) : '';
            $target = isset($item->target) ? trim($item->target) : '';
            $category_title = isset($item->category_title) ? trim($item->category_title) : '';
            $category_description = isset($item->category_description) ? trim($item->category_description) : '';
            if (empty($url)) {
                continue;
            }
            if ($category_title) {
                $category_title = \Security::remove_XSS($category_title);
                $category_description = \Security::remove_XSS($category_description);
            } else {
                $category_description = '';
            }

            $url = \Security::remove_XSS($url);
            $title = \Security::remove_XSS($title);
            $description = \Security::remove_XSS($description);
            $target = \Security::remove_XSS($target);

            $item->url = $url;
            $item->title = $title;
            $item->description = $description;
            $item->target = $target;
            $item->category_title = $category_title;
            $item->category_description = $category_description;
            $result[] = $item;
        }
        return $result;
    }

    public function run()
    {
        $path = $this->path;
        if (!is_readable($path)) {
            return false;
        }
        $this->links_imported = 0;
        $this->links_skipped = 0;

        $items = $this->get_data();
        foreach ($items as $item) {
            $url = $item->url;
            $title = $item->title;
            $description = $item->description;
            $target = $item->target;
            $category_title = $item->category_title;
            $category_description = $item->category_description;

            if ($category_title) {
                $category = $this->ensure_category($category_title, $category_description);
            }

            $link = $this->find_link_by_url($url);
            if ($link && $this->update_existing_entries == false) {
                $this->links_skipped++;
                continue;
            }
            if (empty($link)) {
                $link = new Link();
                $link->c_id = $this->c_id;
                $link->session_id = $this->session_id;
                $link->url = $url;
            }

            $link->title = $title;
            $link->description = $description;
            $link->target = $target;
            $link->category_id = $category ? $category->id : 0;
            $repo = LinkRepository::instance();
            $repo->save($link);
            $this->links_imported++;
        }
    }

    public function ensure_category($title, $description = '')
    {
        $c_id = $this->c_id;
        $session_id = $this->session_id;
        $repo = LinkCategoryRepository::instance();
        $result = $repo->find_one_by_course_and_name($c_id, $session_id, $title);
        if (empty($result)) {
            $result = new LinkCategory();
            $result->c_id = $c_id;
            $result->category_title = $title;
            $result->description = $description;
            $result->session_id = $session_id;
            $repo->save($result);
        }
        return $result;
    }

    public function find_link_by_url($url)
    {
        $c_id = $this->c_id;
        $session_id = $this->session_id;
        $repo = LinkRepository::instance();
        $link = $repo->find_one_by_course_and_url($c_id, $session_id, $url);
        return $link;
    }

}
index.html000064400000000142152004370770006543 0ustar00<html>
<head>
<meta http-equiv="refresh" content="0; url=link.php">
</head>
<body>
</body>
</html>index.php000064400000000406152004370770006371 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Homepage for links tool
 * @package chamilo.link
 */
/**
 * Code
 */
namespace Link;

$language_file = array('link', 'admin');
require_once '../inc/global.inc.php';

Controller::instance()->run();
return;
link.class.php000064400000014604152004370770007330 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

/**
 * Model for Link/Urls
 * 
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class Link
{

    /**
     * @return \Entity\Repository\LinkRepository
     */
    public static function repository()
    {
        return \Entity\Repository\LinkRepository::instance();
    }

    /**
     * @return \Entity\Link
     */
    public static function create($data = null)
    {
        return new self($data);
    }

    function __construct($data = null)
    {
        if ($data) {
            foreach ($this as $key => $value) {
                if (isset($data->{$key})) {
                    $this->{$key} = $data->{$key};
                }
            }
        }
    }

    function __get($name)
    {
        $f = array($this, "get_$name");
        return call_user_func($f);
    }

    function __isset($name)
    {
        $f = array($this, "get_$name");
        return is_callable($f);
    }

    function __set($name, $value)
    {
        $f = array($this, "set_$name");
        if (!is_callable($f)) {
            return;
        }
        call_user_func($f, $value);
    }

    /**
     * @var integer $c_id
     */
    protected $c_id;

    /**
     * @var integer $id
     */
    protected $id;

    /**
     * @var text $url
     */
    protected $url;

    /**
     * @var string $title
     */
    protected $title;

    /**
     * @var text $description
     */
    protected $description;

    /**
     * @var integer $category_id
     */
    protected $category_id;

    /**
     * @var integer $display_order
     */
    protected $display_order;

    /**
     * @var string $on_homepage
     */
    protected $on_homepage;

    /**
     * @var string $target
     */
    protected $target;

    /**
     * @var integer $session_id
     */
    protected $session_id;
    protected $visibility = 0;

    /**
     * Set c_id
     *
     * @param integer $value
     * @return Link
     */
    public function set_c_id($value)
    {
        $this->c_id = $value;
        return $this;
    }

    /**
     * Get c_id
     *
     * @return integer 
     */
    public function get_c_id()
    {
        return $this->c_id;
    }

    /**
     * Set id
     *
     * @param integer $value
     * @return Link
     */
    public function set_id($value)
    {
        $this->id = $value;
        return $this;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function get_id()
    {
        return $this->id;
    }

    /**
     * Set url
     *
     * @param text $value
     * @return Link
     */
    public function set_url($value)
    {
        $this->url = $value;
        return $this;
    }

    /**
     * Get url
     *
     * @return text 
     */
    public function get_url()
    {
        return $this->url;
    }

    /**
     * Set title
     *
     * @param string $value
     * @return Link
     */
    public function set_title($value)
    {
        $this->title = $value;
        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function get_title()
    {
        return $this->title;
    }

    /**
     * Set description
     *
     * @param text $value
     * @return Link
     */
    public function set_description($value)
    {
        $this->description = $value;
        return $this;
    }

    /**
     * Get description
     *
     * @return text 
     */
    public function get_description()
    {
        return $this->description;
    }

    /**
     * Set category_id
     *
     * @param integer $value
     * @return Link
     */
    public function set_category_id($value)
    {
        $this->category_id = $value;
        return $this;
    }

    /**
     * Get category_id
     *
     * @return integer 
     */
    public function get_category_id()
    {
        return $this->category_id;
    }

    /**
     * Set display_order
     *
     * @param integer $value
     * @return Link
     */
    public function set_display_order($value)
    {
        $this->display_order = $value;
        return $this;
    }

    /**
     * Get display_order
     *
     * @return integer 
     */
    public function get_display_order()
    {
        return $this->display_order;
    }

    /**
     * Set on_homepage
     *
     * @param string $value
     * @return Link
     */
    public function set_on_homepage($value)
    {
        $this->on_homepage = $value;
        return $this;
    }

    /**
     * Get on_homepage
     *
     * @return string 
     */
    public function get_on_homepage()
    {
        return $this->on_homepage;
    }

    /**
     * Set target
     *
     * @param string $value
     * @return Link
     */
    public function set_target($value)
    {
        $this->target = $value;
        return $this;
    }

    /**
     * Get target
     *
     * @return string 
     */
    public function get_target()
    {
        return $this->target;
    }

    /**
     * Set session_id
     *
     * @param integer $value
     * @return Link
     */
    public function set_session_id($value)
    {
        $this->session_id = $value;
        return $this;
    }

    /**
     * Get session_id
     *
     * @return integer 
     */
    public function get_session_id()
    {
        return $this->session_id;
    }

    public function get_visibility()
    {
        return (int) $this->visibility;
    }

    public function set_visibility($value)
    {
        $this->visibility = (int) $value;
        return $this;
    }

    public function is_visible()
    {
        return $this->get_visibility() == 1;
    }

    public function is_hidden()
    {
        return $this->get_visibility() == 0;
    }

    public function validate()
    {
        $url = $this->get_url();
        if (empty($url)) {
            return false;
        }
        if (!in_array('curl', get_loaded_extensions())) {
            true;
        }
        
        $defaults = array(
            CURLOPT_URL => $url,
            CURLOPT_FOLLOWLOCATION => true,                 
            CURLOPT_HEADER => 0,
            CURLOPT_NOBODY => true,
            CURLOPT_TIMEOUT => 4,
            CURLOPT_RETURNTRANSFER => false
        );

        $ch = curl_init();
        curl_setopt_array($ch, $defaults);

        $result = curl_exec($ch);
        curl_close($ch);
        return $result;
    }

}
link.php000064400000046236152004370770006232 0ustar00<?php
/* For licensing terms, see /license.txt */

/**
 * Main script for the links tool.
 *
 * Features:
 * - Organize links into categories;
 * - favorites/bookmarks-like interface;
 * - move links up/down within a category;
 * - move categories up/down;
 * - expand/collapse all categories (except the main "non"-category);
 * - add link to 'root' category => category-less link is always visible.
 *
 * @author Patrick Cool, main author, completely rewritten
 * @author René Haentjens, added CSV file import (October 2004)
 * @package chamilo.link
 * @todo improve organisation, tables should come from database library, use formvalidator
 * @todo Needs serious rewriting here. This doesn't make sense
 */

/*	INIT SECTION */

// Language files that need to be included
$language_file = array('link', 'admin');

// Including libraries
require_once '../inc/global.inc.php';
$current_course_tool  = TOOL_LINK;

require_once api_get_path(LIBRARY_PATH).'link.lib.php';

$this_section = SECTION_COURSES;
api_protect_course_script();

$htmlHeadXtra[] = '<script type="text/javascript">
    $(document).ready( function() {
    	for (i=0;i<$(".actions").length;i++) {
    		if ($(".actions:eq("+i+")").html()=="<table border=\"0\"></table>" || $(".actions:eq("+i+")").html()=="" || $(".actions:eq("+i+")").html()==null) {
    			$(".actions:eq("+i+")").hide();
    		}
    	}
     });

     function check_url(id, url) {
     	var url = "'.api_get_path(WEB_AJAX_PATH).'link.ajax.php?a=check_url&url=" +url;
     	var loading = " '.addslashes(Display::return_icon('loading1.gif')).'";
     	$("#url_id_"+id).html(loading);
    	$("#url_id_"+id).load(url);
     }
 </script>';

// @todo change the $_REQUEST into $_POST or $_GET
// @todo remove this code
$link_submitted = isset($_POST['submitLink']);
$category_submitted = isset($_POST['submitCategory']);
$urlview = !empty($_GET['urlview']) ? $_GET['urlview'] : '';
$submit_import = !empty($_POST['submitImport']) ? $_POST['submitImport'] : '';
$down = !empty($_GET['down']) ? $_GET['down'] : '';
$up = !empty($_GET['up']) ? $_GET['up'] : '';
$catmove = !empty($_GET['catmove']) ? $_GET['catmove'] : '';
$editlink = !empty($_REQUEST['editlink']) ? $_REQUEST['editlink'] : '';
$id = !empty($_REQUEST['id']) ? $_REQUEST['id'] : '';
$urllink = !empty($_REQUEST['urllink']) ? $_REQUEST['urllink'] : '';
$title = !empty($_REQUEST['title']) ? $_REQUEST['title'] : '';
$description = !empty($_REQUEST['description']) ? $_REQUEST['description'] : '';
$selectcategory = !empty($_REQUEST['selectcategory']) ? $_REQUEST['selectcategory'] : '';
$submit_link = isset($_REQUEST['submitLink']);
$action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : '';
$category_title = !empty($_REQUEST['category_title']) ? $_REQUEST['category_title'] : '';
$submit_category = isset($_POST['submitCategory']);
$target_link = !empty($_REQUEST['target_link']) ? $_REQUEST['target_link'] : '_self';

$nameTools = get_lang('Links');

// Condition for the session
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id, true, true);

if (isset($_GET['action']) && $_GET['action'] == 'addlink') {
	$nameTools = '';
	$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
	$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddLink'));
}

if (isset($_GET['action']) && $_GET['action'] == 'addcategory') {
	$nameTools = '';
	$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
	$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('AddCategory'));
}

if (isset($_GET['action']) && $_GET['action'] == 'editlink') {
	$nameTools = '';
	$interbreadcrumb[] = array('url' => 'link.php', 'name' => get_lang('Links'));
	$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditLink'));
}

// Database Table definitions
$tbl_link       = Database::get_course_table(TABLE_LINK);
$tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);

$course_id = api_get_course_int_id();

// Statistics
event_access_tool(TOOL_LINK);

Display::display_header($nameTools, 'Links');

?>
<script type="text/javascript">
/* <![CDATA[ */
function MM_popupMsg(msg) { //v1.0
  confirm(msg);
}
/* ]]> */
</script>

<?php

/*	Action Handling */

$nameTools = get_lang('Links');

if (isset($_GET['action'])) {
	$check_token = Security::check_token('request');
	if ($check_token) {
		switch ($_GET['action']) {
			case 'addlink':
				if ($link_submitted) {
					if (!addlinkcategory("link")) {	// Here we add a link
						unset($submit_link);
					}
				}
				break;
			case 'addcategory':
				if ($category_submitted) {
					if (!addlinkcategory('category')) {	// Here we add a category
						unset($submit_category);
					}
				}
				break;
			case 'importcsv':
				if ($_POST['submitImport']) {
					import_csvfile();
				}
				break;
			case 'deletelink':
				deletelinkcategory('link'); // Here we delete a link
				break;
			case 'deletecategory':
				deletelinkcategory('category'); // Here we delete a category
				break;
			case 'editlink':
				editlinkcategory('link'); // Here we edit a link
				break;
			case 'editcategory':
				editlinkcategory('category'); // Here we edit a category
				break;
			case 'visible':
				change_visibility($_GET['id'], $_GET['scope']); // Here we edit a category
				break;
			case 'invisible':
				change_visibility($_GET['id'], $_GET['scope']); // Here we edit a category
				break;
		}
		Security::clear_token();
	}
}
$token = Security::get_token();

/*	Introduction section */

Display::display_introduction_section(TOOL_LINK);

if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) {
	echo '<div class="actions">';
	if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])){
		if (!empty($_POST['lp_id'])){
			$lp_id = Security::remove_XSS($_POST['lp_id']);
		} else {
			$lp_id = Security::remove_XSS($_GET['lp_id']);
		}
		echo "<a href=\"../newscorm/lp_controller.php?".api_get_cidreq()."&gradebook=&action=add_item&type=step&lp_id=".$lp_id."#resource_tab-3\">".Display::return_icon('back.png', get_lang("BackTo").' '.get_lang("LearningPaths"),'',ICON_SIZE_MEDIUM)."</a>";
	} else {
		//echo '<a href="link.php?cidReq='.Security::remove_XSS($_GET['cidReq']).'&amp;urlview='.Security::remove_XSS($_GET['urlview']).'">'.Display::return_icon('back.png', get_lang('BackToLinksOverview'),'',ICON_SIZE_MEDIUM).'</a>';
	}
	echo '</div>';

	// Displaying the correct title and the form for adding a category or link. This is only shown when nothing
	// has been submitted yet, hence !isset($submit_link)
	if (($_GET['action'] == 'addlink' || $_GET['action'] == 'editlink') && empty($_POST['submitLink'])) {



		if ($category == '') {
			$category = 0;
		}
		echo '<form class="form-horizontal" method="post" action="'.api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&amp;urlview='.Security::remove_XSS($urlview).'">';
        if ($_GET['action'] == 'addlink') {
			echo '<legend>'.get_lang('LinkAdd').'</legend>';
		} else {
			echo '<legend>'.get_lang('LinkMod').'</legend>';
		}
		echo '<input type="hidden" name="sec_token" value="'.$token.'" />';

		if ($_GET['action'] == 'editlink') {
		    $clean_link_id = intval($_GET['id']);
            $link_info = get_link_info($_GET['id']);
            if ($link_info) {
                $urllink        = $link_info['url'];
                $title          = $link_info['title'];
                $description    = $link_info['description'];
                $category       = $link_info['category_id'];
                $onhomepage     = '';
                if ($link_info['on_homepage'] != 0) {
                    $onhomepage = 'checked';
                }
                $target_link = $link_info['target'];
            }
			echo '<input type="hidden" name="id" value="'.$clean_link_id.'" />';
		} else {
            $target_link = "_blank";
        }
        
		echo '	<div class="control-group url">
					<label class="control-label">
						<span class="form_required">*</span> URL
					</label>
					<div class="controls">
						<input type="text" name="urllink" class="span6" value="' . (empty($urllink) ? 'http://' : Security::remove_XSS($urllink)) . '" />
					</div>
				</div>';
		echo '	<div class="control-group title">
					<label class="control-label">
						'.get_lang('LinkName').'
					</label>
					<div class="controls">
						<input type="text" name="title" class="span6" value="' . Security::remove_XSS($title) . '" />
					</div>
				</div>';
		echo '	<div class="control-group metadata">
					<label class="control-label">
						'.get_lang('Metadata').'
					</label>
					<div class="controls">
						<a href="../metadata/index.php?eid='.urlencode('Link.'.$clean_link_id).'">'.get_lang('AddMetadata').'</a>
					</div>
				</div>';
		echo '	<div class="control-group description">
					<label class="control-label">
						'.get_lang('Description').'
					</label>
					<div class="controls">
						<textarea class="span3" cols="50" name="description">' .	Security::remove_XSS($description) . '</textarea>
					</div>
				</div>';

		$sqlcategories = "SELECT * FROM ".$tbl_categories." WHERE c_id = $course_id $condition_session ORDER BY display_order DESC";
		$resultcategories = Database::query($sqlcategories);

		if (Database::num_rows($resultcategories)) {
			echo '	<div class="control-group category">
						<label class="control-label">
							'.get_lang('Category').'
						</label>
						<div class="controls">';
			echo '			<select name="selectcategory">';
			echo '			<option value="0">--</option>';
			while ($myrow = Database::fetch_array($resultcategories)) {
				echo '		<option value="'.$myrow['id'].'"';
				if ($myrow['id'] == $category) {
					echo ' selected';
				}
				echo '>'.$myrow['category_title'].'</option>';
			}
			echo '			</select>';
			echo '		</div>
					</div>';
		}
		echo '	<div class="control-group onhomepage">
					<label class="control-label">
					</label>
					<div class="controls">
						<input class="checkbox" type="checkbox" name="onhomepage" id="onhomepage" value="1"'.$onhomepage.'><label for="onhomepage"> '.get_lang('OnHomepage').'?</label>
					</div>
				</div>';
		echo '	<div class="control-group target" id="div_target">
					<label class="control-label">
						'.get_lang('LinkTarget').'
					</label>
					<div class="controls">
						<select  name="target_link" id="target_link">';
        $targets = array('_self'=>get_lang('LinkOpenSelf'),'_blank'=>get_lang('LinkOpenBlank'),'_parent'=>get_lang('LinkOpenParent'),'_top'=>get_lang('LinkOpenTop'));
		foreach ($targets as $target_id => $target) {
			$selected = '';
			if ($target_id == $target_link) {
				$selected = ' selected="selected"';
			}
			echo '    	<option value="'.$target_id.'"'.$selected.'>'.$target.'</option> ';
		}
		echo '        </select>
		<span class="help-block">
            '.get_lang('AddTargetOfLinkOnHomepage').'
            </span>
					</div>
				</div>';

		if (api_get_setting('search_enabled') == 'true') {
			require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
			$specific_fields = get_specific_field_list();

			echo '	<div class="control-group index">
						<label class="control-label">
							'.get_lang('SearchFeatureDoIndexLink').'
						</label>
						<div class="controls">
                            <label for="index_document">
							<input class="checkbox" type="checkbox" name="index_document" id="index_document" checked="checked">
                            '.get_lang('Yes').'
                            </label>
						</div>
                    </div>';

			foreach ($specific_fields as $specific_field) {
				$default_values = '';
				if ($_GET['action'] == 'editlink') {
					$filter = array('field_id' => $specific_field['id'], 'ref_id' => intval($_GET['id']), 'tool_id' => '\''. TOOL_LINK .'\'');
					$values = get_specific_field_values_list($filter, array('value'));
					if (!empty($values)) {
						$arr_str_values = array();
						foreach ($values as $value) {
							$arr_str_values[] = $value['value'];
						}
						$default_values = implode(', ', $arr_str_values);
					}
				}

				$sf_textbox = '
						<div class="control-group">
							<label class="control-label">%s</label>
							<div class="controls">
								<input name="%s" type="text" value="%s"/>
							</div>
						</div>';

				echo sprintf($sf_textbox, $specific_field['name'], $specific_field['code'], $default_values);
			}
		}
		//echo '<input type="hidden" name="origin"  value="' . Security::remove_XSS($_GET['origin']) . '" />';
		echo '<input type="hidden" name="lp_id"  value="' . Security::remove_XSS($_GET['lp_id']) . '" />';
		echo '<div class="control-group">
					<label class="control-label">
					</label>
					<div class="controls">
						<button class="btn save" type="submit" name="submitLink" value="OK">'.get_lang('SaveLink').'</button>
					</div>
				</div>';
		echo '</form>';
	} elseif(($_GET['action'] == 'addcategory' || $_GET['action'] == 'editcategory') && !$submit_category) {
		echo '<form class="form-horizontal " method="post" action="'.api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&amp;urlview='.Security::remove_XSS($urlview).'">';

        if ($_GET['action'] == 'addcategory') {
			echo '<legend>'.get_lang('CategoryAdd').'</legend>';
			$my_cat_title = get_lang('CategoryAdd');
		} else {
			echo '<legend>'.get_lang('CategoryMod').'</legend>';
			$my_cat_title = get_lang('CategoryMod');
		}

		echo '<input type="hidden" name="sec_token" value="'.$token.'" />';
		if ($_GET['action'] == 'editcategory') {
			echo '<input type="hidden" name="id" value="'.$id.'" />';
		}
		echo '	<div class="control-group category">
					<label class="control-label">
						<span class="form_required">*</span> '.get_lang('CategoryName').'
					</label>
					<div class="controls">
						<input type="text" name="category_title" size="50" value="'.Security::remove_XSS($category_title).'" />
					</div>
				</div>';

		echo '	<div class="control-group description">
					<label class="control-label">
						'.get_lang('Description').'
					</label>
					<div class="controls">
						<textarea rows="3" cols="50" name="description">'.Security::remove_XSS($description).'</textarea>
					</div>
				</div>';

		echo '	<div class="control-group">
					<label class="control-label">
					</label>
					<div class="controls">
						<button class="btn save" type="submit" name="submitCategory">'.$my_cat_title.' </button>
					</div>
				</div>';
		echo "</form>";
	}
}

if (!empty($down)) {
	movecatlink($down);
}
if (!empty($up)) {
	movecatlink($up);
}

if (empty($_GET['action']) || ($_GET['action'] != 'editlink' && $_GET['action'] != 'addcategory' && $_GET['action'] != 'addlink') || $link_submitted || $category_submitted) {

	/*	Action Links */

	echo '<div class="actions">';
	if (api_is_allowed_to_edit(null, true)) {
		$urlview = Security::remove_XSS($urlview);
		echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=addlink&amp;category='.(!empty($category) ? $category : '').'&amp;urlview='.$urlview.'">'.Display::return_icon('new_link.png', get_lang('LinkAdd'),'',ICON_SIZE_MEDIUM).'</a>';
		echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=addcategory&amp;urlview='.$urlview.'">'.Display::return_icon('new_folder.png', get_lang('CategoryAdd'),'',ICON_SIZE_MEDIUM).'</a>';

		   /* "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=importcsv&amp;urlview=".$urlview."\">".get_lang('CsvImport')."</a>\n", // RH*/
	}
	// Making the show none / show all links. Show none means urlview=0000 (number of zeros depending on the
	// number of categories). Show all means urlview=1111 (number of 1 depending on teh number of categories).
	$sqlcategories = "SELECT * FROM ".$tbl_categories." WHERE c_id = $course_id $condition_session ORDER BY display_order DESC";
	$resultcategories = Database::query($sqlcategories);
	$aantalcategories = Database::num_rows($resultcategories);
	if ($aantalcategories > 0) {
	    $resultcategories = Database::query($sqlcategories);
		echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&urlview=';
		for ($j = 1; $j <= $aantalcategories; $j++) {
			echo '0';
		}
		echo '">'.Display::return_icon('view_remove.png', $shownone,'',ICON_SIZE_MEDIUM).'</a>';
		echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&urlview=';
		for ($j = 1; $j <= $aantalcategories; $j++) {
			echo '1';
		}
		echo '">'.Display::return_icon('view_tree.png', $showall,'',ICON_SIZE_MEDIUM).'</a>';
	}
	echo '</div>';

	// Displaying the links which have no category (thus category = 0 or NULL), if none present this will not be displayed
	$sqlLinks = "SELECT * FROM ".$tbl_link." WHERE c_id = $course_id AND category_id=0 OR category_id IS NULL";
	$result = Database::query($sqlLinks);
	$numberofzerocategory = Database::num_rows($result);

	if ($numberofzerocategory !== 0) {
	    echo '<table class="data_table">';
		echo '<tr><th style="font-weight: bold; text-align:left;padding-left: 10px;">'.get_lang('General').'</th></tr>';
		echo '</table>';
		showlinksofcategory(0);
	}

	$i = 0;
	$catcounter = 1;
	$view = '0';

	while ($myrow = Database::fetch_array($resultcategories)) {
		// Validacion when belongs to a session
		$session_img = api_get_session_image($myrow['session_id'], $_user['status']);

		//if (!isset($urlview)) {
		if ($urlview == '') {
			// No $view set in the url, thus for each category link it should be all zeros except it's own
			makedefaultviewcode($i);
		} else {
			$view = $urlview;
			$view[$i] = '1';
		}
		// If the $urlview has a 1 for this categorie, this means it is expanded and should be desplayed as a
		// - instead of a +, the category is no longer clickable and all the links of this category are displayed
		$myrow['description'] = text_filter($myrow['description']);

		if (isset($urlview[$i]) && $urlview[$i] == '1') {
			$newurlview = $urlview;
			$newurlview[$i] = '0';

			echo '<tr>';
				echo '<table class="data_table">';
				echo '<tr>';
					echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">';
					echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;urlview='.Security::remove_XSS($newurlview).'">';
					echo '<img src="../img/icons/22/view_remove.png" />&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).'</a><br />&nbsp;&nbsp;&nbsp;'.$myrow['description'];
					echo '</th>';
					if (api_is_allowed_to_edit(null, true)) {
						if ($session_id == $myrow['session_id']) {
							echo '<th>';
							showcategoryadmintools($myrow['id']);
							echo '</th>';
						} else {
							echo '<th>'.get_lang('EditionNotAvailableFromSession');
						}
					}
				echo '</tr>';
				echo '</table>';
				echo showlinksofcategory($myrow['id']);
			echo '</tr>';
		} else {
			echo '<tr>';
				echo '<table class="data_table">';
				echo '<tr>';
					echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;"><a href="'.api_get_self().'?'.api_get_cidreq().'&amp;urlview=';
					echo is_array($view) ? implode('', $view) : $view;
					echo '"><img src="../img/icons/22/view_tree.png" />&nbsp;&nbsp;'.Security::remove_XSS($myrow['category_title']).$session_img;
					echo'</a><br />&nbsp;&nbsp;&nbsp;';
					echo $myrow['description'];
					if (api_is_allowed_to_edit(null, true)) {
						echo '<th style="text-align:center;">';
						showcategoryadmintools($myrow['id']);
						echo '</th>';
					}
					echo '</th>';
				echo '</tr>';

				echo '</table>';
			echo '</tr>';
		}
		// Displaying the link of the category
		$i++;
	}
	echo '</table>';
}

Display::display_footer();link_category.class.php000064400000010451152004370770011221 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link category class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

/**
 * Model for link_category. 
 * 
 * Links can be added to a category.
 * A link belong to at most one category.
 * A link may not belong to a category.
 * Categories cannot be nested, i.e. it is not possible to have categories inside a category.
 * 
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class LinkCategory
{

    /**
     * @return \Link\LinkCategoryRepository
     */
    public static function repository()
    {
        return LinkCategoryRepository::instance();
    }

    /**
     * @return \Entity\LinkCategory
     */
    public static function create($data = null)
    {
        return new self($data);
    }

    /**
     * @var integer $c_id
     */
    protected $c_id;

    /**
     * @var integer $id
     */
    protected $id;

    /**
     * @var string $category_title
     */
    protected $category_title;

    /**
     * @var text $description
     */
    protected $description;

    /**
     * @var integer $display_order
     */
    protected $display_order;

    /**
     * @var integer $session_id
     */
    protected $session_id;
    protected $links = null;

    function __construct($data = null)
    {
        if ($data) {
            foreach ($this as $key => $value) {
                if (isset($data->{$key})) {
                    $this->{$key} = $data->{$key};
                }
            }
        }
    }

    function __get($name)
    {
        $f = array($this, "get_$name");
        return call_user_func($f);
    }

    function __isset($name)
    {
        $f = array($this, "get_$name");
        return is_callable($f);
    }

    function __set($name, $value)
    {
        $f = array($this, "set_$name");
        if (!is_callable($f)) {
            return;
        }
        call_user_func($f, $value);
    }

    /**
     * Set c_id
     *
     * @param integer $value
     * @return LinkCategory
     */
    public function set_c_id($value)
    {
        $this->c_id = $value;
        return $this;
    }

    /**
     * Get c_id
     *
     * @return integer 
     */
    public function get_c_id()
    {
        return $this->c_id;
    }

    /**
     * Set id
     *
     * @param integer $value
     * @return LinkCategory
     */
    public function set_id($value)
    {
        $this->id = $value;
        return $this;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function get_id()
    {
        return $this->id;
    }

    /**
     * Set category_title
     *
     * @param string $value
     * @return LinkCategory
     */
    public function set_category_title($value)
    {
        $value = trim($value);
        $this->category_title = $value;
        return $this;
    }

    /**
     * Get category_title
     *
     * @return string 
     */
    public function get_category_title()
    {
        return $this->category_title;
    }

    /**
     * Set description
     *
     * @param text $value
     * @return LinkCategory
     */
    public function set_description($value)
    {
        $this->description = $value;
        return $this;
    }

    /**
     * Get description
     *
     * @return text 
     */
    public function get_description()
    {
        return $this->description;
    }

    /**
     * Set display_order
     *
     * @param integer $value
     * @return LinkCategory
     */
    public function set_display_order($value)
    {
        $this->display_order = $value;
        return $this;
    }

    /**
     * Get display_order
     *
     * @return integer 
     */
    public function get_display_order()
    {
        return $this->display_order;
    }

    /**
     * Set session_id
     *
     * @param integer $value
     * @return LinkCategory
     */
    public function set_session_id($value)
    {
        $this->session_id = $value;
        return $this;
    }

    /**
     * Get session_id
     *
     * @return integer 
     */
    public function get_session_id()
    {
        return $this->session_id;
    }

    public function get_links()
    {
        if (is_null($this->links)) {
            $this->links = LinkRepository::instance()->find_by_category($this);
        }
        return $this->links;
    }

}
link_category_repository.class.php000064400000015463152004370770013530 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link category repository class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

use Database;

/**
 * Database interface for link_category
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class LinkCategoryRepository
{

    /**
     * 
     * @return \Link\LinkCategoryRepository
     */
    public static function instance()
    {
        static $result = null;
        if (empty($result)) {
            $result = new self();
        }
        return $result;
    }

    public function save($category)
    {
        $id = $category->id;
        if (empty($id)) {
            return $this->insert($category);
        } else {
            return $this->update($category);
        }
    }

    public function insert($category)
    {
        $c_id = (int) $category->c_id;

        $session_id = (int) $category->session_id;
        $session_id = $session_id ? $session_id : '0';

        $category_title = trim($category->category_title);
        $category_title = Database::escape_string($category_title);

        $description = trim($category->description);
        $description = Database::escape_string($description);

        $display_order = $this->next_display_order($c_id);

        $table = Database :: get_course_table(TABLE_LINK_CATEGORY);
        $sql = "INSERT INTO $table 
                    (c_id, category_title, description, display_order, session_id)
			    VALUES 
                    ($c_id , '$category_title', '$description', $display_order, $session_id)";
        $result = (bool) Database :: query($sql);

        if ($result) {
            $id = Database::insert_id();
            $category->id = $id;
            $category->display_order = $display_order;
        }
        return $result;
    }

    function update($category)
    {
        $c_id = (int) $category->c_id;
        $id = (int) $category->id;

        $session_id = (int) $category->session_id;
        $session_id = $session_id ? $session_id : '0';

        $category_title = trim($category->category_title);
        $category_title = Database::escape_string($category_title);

        $description = trim($category->description);
        $description = Database::escape_string($description);

        $display_order = (int) $category->display_order;

        $table = Database :: get_course_table(TABLE_LINK_CATEGORY);
        $sql = "UPDATE $table SET                    
                    category_title = '$category_title',
                    description = '$description',
                    display_order = $display_order,
                    session_id = $session_id
			    WHERE
                    c_id = $c_id AND
                    id = $id";
        $result = (bool) Database :: query($sql);
        return $result;
    }

    function remove($category)
    {
        $table = Database :: get_course_table(TABLE_LINK_CATEGORY);
        $c_id = (int) $category->c_id;
        $id = (int) $category->id;

        $sql = "DELETE FROM $table WHERE c_id=$c_id AND id=$id";
        $success = (bool) Database :: query($sql);

        if ($success) {
            LinkRepository::instance()->remove_by_category($category);
        }
        return $success;
    }
    
    function remove_by_course($c_id, $session_id = 0)
    {
        $result = true;
        $categories = $this->find_by_course($c_id, $session_id);
        foreach($categories as $category){
            $success = $this->remove($category);
            if(!$success){
                $result = false;
            }
        }
        return $result;
    }

    function next_display_order($c_id)
    {
        $table = Database :: get_course_table(TABLE_LINK_CATEGORY);
        $sql = "SELECT MAX(display_order) FROM  $table WHERE c_id = $c_id ";
        $rs = Database :: query($sql);
        list ($result) = Database :: fetch_row($rs);
        $result = $result + 1;
        $result = intval($result);
        return $result;
    }

    /**
     *
     * @param string $where
     * @return array
     */
    public function find($where)
    {
        $result = array();
        $table = Database :: get_course_table(TABLE_LINK_CATEGORY);
        $where = $where ? "WHERE $where" : '';
        $sql = "SELECT * FROM $table $where ORDER BY display_order DESC";
        $rs = Database :: query($sql);
        while ($data = Database::fetch_object($rs)) {
            $result[] = LinkCategory::create($data);
        }
        return $result;
    }

    /**
     *
     * @param string $where
     * @return \Link\LinkCategory 
     */
    public function find_one($where)
    {
        $items = $this->find($where);
        foreach ($items as $item) {
            return $item;
        }
        return null;
    }

    /**
     *
     * @param int $c_id
     * @param int  $id
     * @return \Link\LinkCategory 
     */
    public function find_one_by_id($c_id, $id)
    {
        $where = "c_id = $c_id AND id = $id";
        return $this->find_one($where);
    }


    /**
     *
     * @param int $c_id
     * @param int $session_id
     * @param string $title
     * @return \Link\LinkCategory 
     */
    public function find_one_by_course_and_name($c_id, $session_id = 0, $title)
    {
        $c_id = (int) $c_id;
        $session_id = (int) $session_id;
        $title = Database::escape_string($title);
        
        $condition_session = api_get_session_condition($session_id, true, true);
        $where = "c_id = $c_id $condition_session AND category_title = '$title'";
        return $this->find_one($where);
    }

    function find_by_course($c_id, $session_id = 0)
    {
        $c_id = (int) $c_id;
        $session_id = (int) $session_id;
        $condition_session = api_get_session_condition($session_id, true, true);
        $where = "c_id = $c_id $condition_session";
        return $this->find($where);
    }

    /**
     * Ensure $ids are sorted in the order given from greater to lower.
     * 
     * Simple algorithm, works only if all ids are given at the same time.
     * This would not work if pagination were used and only a subset were sorted.
     * On the other hand the algorithm is sturdy, it will work even if current 
     * weights/display orders are not correctly set up in the db.
     * 
     * @param int $c_id
     * @param array $ids 
     */
    public function order($c_id, $ids)
    {
        $result = true;
        $ids = array_map('intval', $ids);
        $table = Database::get_course_table(TABLE_LINK_CATEGORY);

        $counter = 0;
        $weight = count($ids) + 1;
        foreach ($ids as $id) {
            $sql = "UPDATE $table SET display_order = $weight WHERE c_id = $c_id AND id = $id";
            $success = Database::query($sql);
            if (!$success) {
                $result = false;
            }
            --$weight;
        }
        return $result;
    }

}
link_form.class.php000064400000007316152004370770010355 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link form class definition
 * @package chamilo.link
 */
/**
 * Init
 */
namespace Link;

use Chamilo;

/**
 * Edit/Create link form.
 * 
 * @license /licence.txt
 * @author Laurent Opprecht <laurent@opprecht.info>
 */
class LinkForm extends \FormValidator
{

    protected $link;

    function __construct($form_name = 'link', $method = 'post', $action = '', $target = '', $attributes = null, $track_submit = true)
    {
        parent::__construct($form_name, $method, $action, $target, $attributes, $track_submit);
    }

    /**
     *
     * @return \Link\LinkCategory
     */
    public function get_link()
    {
        return $this->link;
    }

    public function set_link($value)
    {
        $this->link = $value;
    }

    /**
     *
     * @param \Link\LinkCategory $link
     */
    function init($link = null)
    {
        $this->set_link($link);

        $defaults = array();
        $defaults['url'] = $link->url ? $link->url : 'http://';
        $defaults['title'] = $link->title;
        $defaults['description'] = $link->description;
        $defaults['category_id'] = $link->category_id;
        $defaults['display_order'] = $link->display_order;
        $defaults['on_homepage'] = $link->on_homepage;
        $defaults['target'] = $link->target;

        $this->add_hidden('c_id', $link->c_id);
        $this->add_hidden('id', $link->id);
        $this->add_hidden('session_id', $link->session_id);

        $form_name = $category->id ? get_lang('LinkMod') : get_lang('LinkAdd');
        $this->add_header($form_name);


        $this->add_textfield('url', get_lang('Url'), $required = true, array('class' => 'span6'));
        $this->addRule('url', get_lang('MalformedUrl'), 'regex', '|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i');

        $this->add_textfield('title', get_lang('Title'), $required = false, array('class' => 'span6'));

        $this->add_textarea('description', get_lang('Description'), array('class' => 'span3'));

        $this->add_checkbox('on_homepage', '', get_lang('OnHomepage'));

        $id = $link->id;
        if ($id) {
            $url = Chamilo::url('/main/metadata/index.php', array('eid' => "Link.$id"));
            $metadata = '<a class="control-text" href="' . $url . '">' . get_lang('AddMetadata') . '</a>';
            $this->add_label(get_lang('Metadata'), $metadata);
        }

        $options = array();
        $options[0] = '--';
        $categories = LinkCategoryRepository::instance()->find_by_course($link->c_id, $link->session_id);
        foreach ($categories as $category) {
            $options[$category->id] = $category->category_title;
        }
        $this->add_select('category_id', get_lang('Category'), $options);

        $targets = array(
            '_self' => get_lang('LinkOpenSelf'),
            '_blank' => get_lang('LinkOpenBlank'),
            '_parent' => get_lang('LinkOpenParent'),
            '_top' => get_lang('LinkOpenTop')
        );
        $this->add_select('target', get_lang('LinkTarget'), $targets);
        //$help = '<span class="help-block">' . get_lang('AddTargetOfLinkOnHomepage') . '</span>';
        //$this->add_label('', $help);

        $this->add_button('save', get_lang('Save'), array('class' => 'btn save'));

        $this->setDefaults($defaults);
    }

    function update_model()
    {
        $values = $this->exportValues();
        $link = $this->get_link();
        $link->url = $values['url'];
        $link->title = $values['title'];
        $link->description = $values['description'];
        $link->category_id = $values['category_id'];
        $link->on_homepage = isset($values['on_homepage']) ? $values['on_homepage'] : false;
        $link->target = $values['target'];
    }

}
link_goto.php000064400000002041152004370770007244 0ustar00<?php
/* For licensing terms, see /license.txt */

/**
* This page is used to launch an event when a user clicks
* on a page linked in a course.
* - It gets name of URL
* - It calls the event function
* - It redirects the user to the linked page
*
* Need the liens.id, user.user_id et cours.code when called
* ?link_id=$myrow[0]&link_url=$myrow[1]
* url is given to avoid a new select
*
* @author Thomas Depraetere, Hugues Peeters, Christophe Gesch� - original versions
* @package chamilo.link
*/

/*	INIT SECTION */

require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;

$link_url = html_entity_decode(Security::remove_XSS($_GET['link_url']));
$link_id = intval($_GET['link_id']);

// Launch event
event_link($link_id);

header("Cache-Control: no-store, no-cache, must-revalidate");   // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");                                     // HTTP/1.0
header("Location: $link_url");

// To be sure that the script stops running after the redirection
exit;
link_repository.class.php000064400000024372152004370770011632 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link repository class definition
 * @package chamilo.link
 */
/**
 * Init
 */
namespace Link;

use Database;

/**
 * Database interface for Link
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt 
 */
class LinkRepository
{

    /**
     * 
     * @return \Link\LinkRepository
     */
    public static function instance()
    {
        static $result = null;
        if (empty($result)) {
            $result = new self();
        }
        return $result;
    }

    public function save($link)
    {
        $id = $link->id;
        if (empty($id)) {
            return $this->insert($link);
        } else {
            return $this->update($link);
        }
    }

    /**
     *
     * @param \Link\Link $link
     * @return bool 
     */
    public function insert($link)
    {
        $c_id = (int) $link->c_id;

        $session_id = (int) $link->session_id;
        $session_id = $session_id ? $session_id : '0';

        $url = trim($link->url);
        $url = Database::escape_string($url);

        $title = trim($link->title);
        $title = Database::escape_string($title);

        $description = trim($link->description);
        $description = Database::escape_string($description);

        $category_id = intval($link->category_id);
        $category_id = $category_id ? $category_id : '0';

        $display_order = $this->next_display_order($c_id);

        $on_homepage = $link->on_homepage;
        $on_homepage = $on_homepage ? '1' : '0';

        $target = $link->target;
        $target = Database::escape_string($target);

        $table = Database :: get_course_table(TABLE_LINK);
        $sql = "INSERT INTO $table 
                    (c_id, url, title, description, category_id, display_order, on_homepage, target, session_id)
			    VALUES 
                    ($c_id , '$url', '$title', '$description', $category_id, $display_order, '$on_homepage', '$target', $session_id)";
        $result = (bool) Database :: query($sql);



        if ($result) {
            $id = Database::insert_id();
            $link->id = $id;
            $link->display_order = $display_order;

            $_course = api_get_course_info_by_id($c_id);
            $tool = TOOL_LINK;
            $user_id = api_get_user_id();
            api_item_property_update($_course, $tool, $id, 'LinkAdded', $user_id);
        }
        return $result;
    }

    function update($link)
    {

        $c_id = (int) $link->c_id;
        $id = (int) $link->id;

        $session_id = (int) $link->session_id;
        $session_id = $session_id ? $session_id : '0';

        $url = trim($link->url);
        $url = Database::escape_string($url);

        $title = trim($link->title);
        $title = Database::escape_string($title);

        $description = trim($link->description);
        $description = Database::escape_string($description);

        $category_id = intval($link->category_id);
        $category_id = $category_id ? $category_id : '0';

        $display_order = (int) $link->display_order;

        $on_homepage = $link->on_homepage;
        $on_homepage = $on_homepage ? '1' : '0';

        $target = $link->target;
        $target = Database::escape_string($target);

        $table = Database :: get_course_table(TABLE_LINK);
        $sql = "UPDATE $table SET
                    url = '$url',
                    title = '$title',
                    description = '$description',
                    category_id = $category_id, 
                    display_order = $display_order,
                    on_homepage = '$on_homepage',
                    target = '$target',
                    session_id = $session_id
			    WHERE
                    c_id = $c_id AND
                    id = $id";
        $result = (bool) Database :: query($sql);

        if ($result) {
            $_course = api_get_course_info_by_id($c_id);
            $tool = TOOL_LINK;
            $user_id = api_get_user_id();
            api_item_property_update($_course, $tool, $id, 'LinkUpdated', $user_id);
        }
        return $result;
    }

    public function remove_by_category($category)
    {
        $result = true;
        $c_id = (int) $category->c_id;
        $id = (int) $category->id;
        $where = "l.c_id=$c_id AND l.category_id=$id";
        $links = $links = $this->find($where);
        foreach ($links as $link) {
            $success = $this->remove($link);
            if (!$success) {
                $result = false;
            }
        }

        return $result;
    }

    public function remove_by_course($c_id, $session_id = 0)
    {
        $result = true;     
        $session_where = api_get_session_condition($session_id, true, true);
        $where = "l.c_id=$c_id $session_where";
        
        $links = $links = $this->find($where);
        foreach ($links as $link) {
            $success = $this->remove($link);
            if (!$success) {
                $result = false;
            }
        }
        
        

        return $result;
    }

    /**
     *
     * Note:
     * 
     * Note as ids are reused when objects are deleted it is either we delete
     * everything or nothing.
     * 
     * @param \Link\Link|object $link
     * @return bool 
     */
    public function remove($link)
    {
        $table = Database :: get_course_table(TABLE_LINK);
        $c_id = (int) $link->c_id;
        $id = (int) $link->id;

        $sql = "DELETE FROM $table WHERE c_id=$c_id AND id=$id";
        $result = Database :: query($sql);
        if ($result) {            
            $tool = TOOL_LINK;
            $tbl_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
            $sql = "DELETE FROM $tbl_property WHERE c_id=$c_id AND ref=$id AND tool='$tool'";
            Database :: query($sql);
            
            
            $id = "Link.$id";
            $table = Database :: get_course_table(TABLE_METADATA);
            $sql = "DELETE FROM $table WHERE c_id=$c_id AND eid='$id'";
            Database :: query($sql);
        }
        return (bool) $result;
    }

    /**
     *
     * @param string $where
     * @return \Link\Link 
     */
    public function find_one($where)
    {
        $items = $this->find($where);
        foreach ($items as $item) {
            return $item;
        }
        return null;
    }
    
    /**
     *
     * @param int $c_id
     * @param int $id
     * @return \Link\Link 
     */
    public function find_one_by_id($c_id, $id)
    {
        $where = "l.c_id = $c_id AND l.id = $id";
        return $this->find_one($where);
    }
    
    /**
     *
     * @param int $c_id
     * @param int $session_id
     * @param string $url
     * @return \Link\Link 
     */
    public function find_one_by_course_and_url($c_id, $session_id, $url)
    {
        $c_id = (int)$c_id;
        $session_id = (int)$session_id;
        $url = Database::escape_string($url);
        
        $session_where =api_get_session_condition($session_id, true, true);
        $where = "l.c_id = $c_id $session_where AND l.url = '$url'";
        return $this->find_one($where);
    }

    /**
     *
     * @param string $where
     * @return array
     */
    public function find($where = '')
    {
        $result = array();

        $tbl_link = Database :: get_course_table(TABLE_LINK);
        $tbl_property = Database :: get_course_table(TABLE_ITEM_PROPERTY);
        $tool = TOOL_LINK;
        $where = $where ? " AND ($where)" : '';

        $sql = "SELECT 
                    l.*, 
                    p.visibility 
                FROM 
                    $tbl_link AS l,
                    $tbl_property AS p
                WHERE  
                    p.tool='$tool' AND
					l.id = p.ref AND
					l.c_id = p.c_id
                    $where
                ORDER BY 
                    l.display_order DESC";
        $rs = Database :: query($sql);
        while ($data = Database::fetch_object($rs)) {
            $result[] = Link::create($data);
        }
        return $result;
    }

    /**
     *
     * @param \Link\LinkCategory $category 
     */
    public function find_by_category($category, $visible_only = false)
    {
        $session_id = $category->session_id;
        $id = $category->id;

        $where = $visible_only ? 'p.visibility=1' : '(p.visibility=0 OR p.visibility=1)';
        $where .=api_get_session_condition($session_id, true, true);
        $where .= "AND l.category_id = $id";
        return $this->find($where);
    }

    public function make_visible($c_id, $id)
    {
        $_course = api_get_course_info_by_id($c_id);
        $user_id = api_get_user_id();
        $result = api_item_property_update($_course, TOOL_LINK, $id, 'visible', $user_id);
        return $result;
    }

    public function make_invisible($c_id, $id)
    {
        $_course = api_get_course_info_by_id($c_id);
        $user_id = api_get_user_id();
        $result = api_item_property_update($_course, TOOL_LINK, $id, 'invisible', $user_id);
        return $result;
    }

    function next_display_order($c_id)
    {
        $table = Database :: get_course_table(TABLE_LINK);
        $sql = "SELECT MAX(display_order) FROM  $table WHERE c_id = $c_id ";
        $rs = Database :: query($sql);
        list ($result) = Database :: fetch_row($rs);
        $result = $result + 1;
        $result = intval($result);
        return $result;
    }

    /**
     * Ensure $ids are sorted in the order given from greater to lower
     * 
     * Simple algorithm, works only if all ids are given at the same time.
     * This would not work if pagination were used and only a subset were sorted.
     * On the other hand the algorithm is sturdy, it will work even if current 
     * weights/display orders are not correctly set up in the db.
     * 
     * @param int $c_id
     * @param array $ids 
     */
    public function order($c_id, $ids)
    {
        $result = true;
        $ids = array_map('intval', $ids);
        $table = Database :: get_course_table(TABLE_LINK);

        $counter = 0;
        $weight = count($ids) + 1;
        foreach ($ids as $id) {
            $sql = "UPDATE $table SET display_order = $weight WHERE c_id = $c_id AND id = $id";
            $success = Database::query($sql);
            if (!$success) {
                $result = false;
            }
            --$weight;
        }
        return $result;
    }

}
request.class.php000064400000005366152004370770010070 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link request class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

/**
 * Html request for Link.
 * 
 * @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
 * @license /license.txt
 */
class Request extends \Request
{
    
    const PARAM_ID = 'id';
    const PARAM_IDS = 'ids';
    const PARAM_C_ID = 'c_id';
    const PARAM_SESSION_ID = 'id_session';
    const PARAM_ACTION = 'action';
    const PARAM_SECURITY_TOKEN = 'sec_token';
    const PARAM_IS_STUDENT_VIEW = 'isStudentView';
    const PARAM_GROUP_ID = 'toolgroup';

    /**
     * Action to perform.      * 
     * @return string
     */
    public static function get_action()
    {
        $result = Request::get(self::PARAM_ACTION, '');
        return $result;
    }

    /**
     * Returns the object id. 
     * 
     * @return int
     */
    public static function get_id()
    {
        $result = \Request::get(self::PARAM_ID, 0);
        $result = intval($result);
        return $result;
    }

    /**
     * List of objet ids
     * 
     * @return array 
     */
    public static function get_ids()
    {
        $result = Request::get(self::PARAM_IDS, array());
        if (is_array($result)) {
            return $result;
        }

        $result = trim($result);
        if (empty($result)) {
            return array();
        }

        $result = explode(',', $result);
        return $result;
    }

    /**
     * Returns the course id. 
     * 
     * @return int
     */
    public static function get_c_id()
    {
        $result = Request::get(self::PARAM_C_ID, 0);
        $result = intval($result);
        $result = $result ? $result : api_get_real_course_id();
        $result = $result ? $result : 0;
        return $result;
    }

    /**
     * Returns the session id. 
     * 
     * @return int
     */
    public static function get_session_id()
    {
        $result = Request::get(self::PARAM_SESSION_ID, 0);
        $result = intval($result);
        return $result;
    }

    /**
     * Returns the session id. 
     * 
     * @return int
     */
    public static function get_group_id()
    {
        $result = Request::get(self::PARAM_GROUP_ID, 0);
        $result = intval($result);
        return $result;
    }

    /**
     * Returns the security token. 
     * 
     * @return string
     */
    public static function get_security_token()
    {
        $result = Request::get(self::PARAM_SEC_TOKEN, 0);
        return $result;
    }

    /**
     * Returns true if the user is in "student view". False otherwise. 
     * 
     * @return bool
     */
    public static function is_student_view()
    {
        return Request::get(self::PARAM_IS_STUDENT_VIEW, false) == 'true';
    }

}
resources/js/main.js000064400000003413152004370770010462 0ustar00
function Proxy() {};

Proxy.prototype.root = function(){
    return www + '/main/inc/ajax/link.ajax.php';
}

Proxy.prototype.post = function(data, f){    
    if(typeof(sec_token)!=='undefined'){  
        data.sec_token = sec_token;
    }
    $.post(this.root(), data, f, 'json');
}

var Link = new Proxy();

Link.hide = function(c_id, id, f)
{
    var data = {
        c_id: c_id, 
        id: id, 
        action: 'hide_link'
    };
    this.post(data, f);
};

Link.show = function(c_id, id, f)
{
    var data = {
        c_id: c_id, 
        id: id, 
        action: 'show_link'
    };
    this.post(data, f);
};

Link.del = function(c_id, id, f)
{
    var data = {
        c_id: c_id, 
        id: id, 
        action: 'delete_link'
    };
    this.post(data, f);
};

Link.delete_by_course = function(c_id, session_id, f)
{
    var data = {
        c_id: c_id, 
        session_id: session_id, 
        action: 'delete_by_course'
    };
    this.post(data, f);
};

Link.sort = function(c_id, ids, f){
    var data = {
        c_id: c_id, 
        ids: ids, 
        action: 'sort_links'
    };
    this.post(data, f);
};

Link.validate = function(c_id, id, f)
{
    var data = {
        c_id: c_id, 
        id: id, 
        action: 'validate_link'
    };
    this.post(data, f);
};



var LinkCategory = new Proxy();

LinkCategory.del = function(c_id, id, f)
{
    var data = {
        c_id: c_id, 
        id: id, 
        action: 'delete_category'
    };
    this.post(data, f);
};

LinkCategory.sort = function(c_id, ids, f){
    var data = {
        c_id: c_id, 
        ids: ids, 
        action: 'sort_categories'
    };
    this.post(data, f);
};


var message = {};

message.update = function(data){
    text = typeof(data)=='string' ? data : data.message;
    $('#messages').html(text)
}upload_file_form.class.php000064400000004454152004370770011703 0ustar00<?php
/* For licensing terms, see /license.txt */
/**
 * Link upload file form class definition
 * @package chamilo.link
 */
/**
 * Init
 */

namespace Link;

use Chamilo;

/**
 * Form to upload a file.
 * 
 * @license /licence.txt
 * @author Laurent Opprecht <laurent@opprecht.info>
 */
class UploadFileForm extends \FormValidator
{

    function __construct($form_name = 'upload_file', $method = 'post', $action = '', $target = '', $attributes = null, $track_submit = true)
    {
        parent::__construct($form_name, $method, $action, $target, $attributes, $track_submit);
    }

    /**
     *
     * 
     */
    function init()
    {
        $form_name = get_lang('UploadFile');
        $this->add_header($form_name);

        $label = get_lang('File');
        $this->add_file('file', $label);
        $this->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
        //$this->add_checkbox('replace', '', get_lang('ReplaceExistingEntries'));

        $this->add_button('save', get_lang('Save'), array('class' => 'btn save'));
        
         $label = get_lang('CSVMustLookLike');     
         $label = "<h4>$label</h4>";
         $help = '<pre>
                    <strong>"url"</strong>;"title";"description";"target";"category_title";"category_description"
                    "http://chamilo.org";"Chamilo";"";"_self";"";""
                    "http://google.com";"Google";"";"_self";"Google";""
                    "http://mail.google.com";"Google";"";"_self";"Google";""
                    </pre>';
         
         $this->add_html($label . $help);
    }

    /**
     *
     * @return array 
     */
    public function get_file()
    {
        $result = Request::file('file', array());
        if (empty($result)) {
            return array();
        }
        $error = isset($result['error']) ? (bool) $result['error'] : false;
        if ($error) {
            return array();
        }
        return $result;
    }

    public function validate()
    {
        $result = (bool) parent::validate();
        if ($result == false) {
            return false;
        }
        $file = $this->get_file();
        if (empty($file)) {
            return false;
        }
        return true;
    }

//    public function get_update_existing_entries(){
//        return (bool)$this->exportValue('replace');
//    }
}
error_log000064400000120472152004370770006474 0ustar00[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:49 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:49 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 13:03:49 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:52 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 13:03:52 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 13:03:52 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 14:20:36 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 14:20:36 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 14:20:36 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:41:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:41:43 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 21:41:43 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:53:20 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[05-May-2026 21:53:20 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[05-May-2026 21:53:20 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:22 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 05:58:22 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:43 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 05:58:43 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 05:58:43 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:58:44 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:58:44 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 07:58:44 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1483
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1500
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1506
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1529
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1532
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1535
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1538
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:59:22 Europe/Paris] PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /home/missmand/public_html/learning/old/main/inc/lib/internationalization.lib.php on line 1541
[11-May-2026 07:59:22 Europe/Paris] PHP Warning:  require_once(/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php): failed to open stream: No such file or directory in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101
[11-May-2026 07:59:22 Europe/Paris] PHP Fatal error:  require_once(): Failed opening required '/var/www/restricted/ssh/missm/www/main/inc/lib/database.lib.php' (include_path='.:/var/www/restricted/ssh/missm/www/main/inc/lib/pear:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/missmand/public_html/learning/old/main/inc/global.inc.php on line 101

Hacked By AnonymousFox1.0, Coded By AnonymousFox