Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for Zend Guard Encoder)
- *
- * @ Version : 3.0.4.0
- * @ Author : DeZender
- * @ Release on : 02.04.2017
- * @ Official site : http://DeZender.Net
- *
- */
- class BlinkFW_Activity extends BlinkFW_Content
- {
- const prefijo_cachekey = 'clase_';
- const search_cache_key = 'search_activity_cache';
- const search_cache_key_repositorio = 'search_repository_activity_cache';
- const TYPE = -1;
- const THUMBNAIL_DEFAULT_WIDTH = 100;
- const THUMBNAIL_DEFAULT_HEIGHT = 100;
- const THUMBNAIL_ATTACHMENT_WIDTH = 103;
- const THUMBNAIL_ATTACHMENT_HEIGHT = 135;
- const THUMBNAIL_RESOURCE_WIDTH = 144;
- const THUMBNAIL_RESOURCE_HEIGHT = 190;
- const DEFAULT_NUM_SLIDES_PER_EXAM = 8;
- protected $IDCLASE;
- protected $IDCURSO;
- protected $TIPO_CLASE;
- protected $EVAL_TYPE;
- protected $REPEATABLE;
- protected $SECUENCIA;
- protected $ORDEN;
- protected $DESCRIPCION;
- protected $CODIGO_CORTO;
- protected $TIEMPOLIMITE;
- protected $IDTEMA;
- protected $PONDERACION;
- protected $EXTRA;
- protected $IMAGEN;
- protected $SETTINGS;
- protected $NIVEL_INDICE;
- protected $IDTIPOLICENCIA;
- protected $LICENCIA;
- protected $BLOQUEADO;
- protected $TIPO_CONTENIDO;
- protected $IDCLASEORIGINAL;
- protected $FILTER;
- protected $COMMITCOMPLETE;
- protected $ISRESOURCE;
- protected $IDCLASE_EXT;
- protected $RegistroAcceso;
- protected $IDUSUARIOAUTOR;
- protected $IDUSEROWNER;
- protected $ONLINE;
- protected $VISIBLE;
- protected $BORRADO;
- protected $SCORM_VERSION;
- protected $_imagePath;
- protected $_imagePath_thumbnail;
- protected $_numTransparencias;
- static public $CAMPOS_SINC_ORIGINAL = array('TIPO_CONTENIDO');
- static public $CAMPOS_SINC_COPIA = array('TIPO_CONTENIDO', 'EXTRA');
- protected $HAS_MEDIARESOURCES;
- protected $_arrSlidesDB;
- public function __construct()
- {
- parent::__construct();
- parent::$customizationTable = 'blinkfw_activities_customization';
- parent::$customizationFields = array('TIPO_CLASE', 'NOMBRE', 'DESCRIPCION', 'CODIGO_CORTO', 'IDASIGNATURA', 'EDADRECOMENDADA', 'EJE_CATEGORIAS', 'IDIOMA', 'NUM_VOTOS', 'ORDEN', 'FECHA_ULT_MODIF', 'DOMINIO', 'TIEMPOLIMITE', 'IDTEMA', 'BORRADO', 'VISIBLE', 'PONDERACION', 'EXTRA', 'IMAGEN', 'SETTINGS', 'NIVEL_INDICE', 'IDUSUARIOAUTOR', 'IDUSEROWNER', 'ONLINE', 'BLOQUEADO', 'TIPO_CONTENIDO', 'EVAL_TYPE', 'REPEATABLE', 'FILTER', 'INCOMPATIBLE_DEVICES', 'SCORM_VERSION', 'CONTENT_STYLE', 'COMMITCOMPLETE', 'ISRESOURCE');
- parent::$customizationIdField = 'IDCURSO';
- parent::$customizationPrimaryKeyField = 'IDCLASE';
- parent::$customizationDateModifiedField = 'FECHA_ULT_MODIF';
- $this->setAccessControl(TYPE_ACCESS_FREE);
- $this->setNivelIndice(1);
- $this->setVisible(1);
- $this->setPonderacion(1);
- $this->setIsResource(0);
- }
- static public function getObjectIDCacheKey($speaddc6, $spdbf624 = 0)
- {
- return self::prefijo_cachekey . $speaddc6 . ($spdbf624 ? '_' . $spdbf624 : '');
- }
- public function checkCustomization($spdbf624)
- {
- if ($spdbf624 && ($spdbf624 != $this->getIDCurso())) {
- $sp2fef01 = ObjectFactory::invokeStatic(ObjectFactory::Course)->getObjectFromID($spdbf624);
- if (!$sp2fef01 || ($sp2fef01->getIDCursoOriginal() != $this->getIDCurso())) {
- return false;
- }
- }
- return true;
- }
- public function belongsTo($sp39c2bd)
- {
- if (array_search($sp39c2bd, array($this->getIDCurso(), $this->getIDCustomization())) !== false) {
- return true;
- }
- $sp0dadf9 = ObjectFactory::invokeStatic(ObjectFactory::Course)->getObjectFromID($sp39c2bd);
- if ($sp0dadf9 && ($sp0dadf9->getIDCursoOriginal() == $this->getIDCurso())) {
- return true;
- }
- return false;
- }
- public function fillObj($sp56a32c)
- {
- $this->rellenarClase($sp56a32c);
- }
- static public function getObjectFromData($sp56a32c)
- {
- if (in_array($sp56a32c['TIPO_CLASE'], array(TIPO_CLASE_FORO, TIPO_CLASE_WIKI, TIPO_CLASE_CHAT)) !== false) {
- $spc4f300 = ObjectFactory::createObjForType(ObjectFactory::Activity, $sp56a32c['TIPO_CLASE']);
- }
- else {
- $spc4f300 = ObjectFactory::createObj(ObjectFactory::Activity);
- }
- $spc4f300->fillObj($sp56a32c);
- $spc4f300->getNumTransparencias();
- $spc4f300->_arrSlidesDB = explode(',', $spc4f300->SECUENCIA);
- return $spc4f300;
- }
- public function _borrarObjetoCache()
- {
- self::borrarObjetoCache($this->getID(), $this->getIDCurso() != $this->getIDCustomization() ? $this->getIDCustomization() : 0);
- }
- static public function borrarObjetoCache($speaddc6, $spdbf624 = 0)
- {
- FWUtils::log(BlinkFW_LogFile::LEVEL_DEBUG, 'Borrando cache clase = ' . $speaddc6);
- ObjectFactory::invokeStatic(ObjectFactory::Memcache)->delete(self::getObjectIDCacheKey($speaddc6, $spdbf624));
- }
- static public function getTypeIdentifier()
- {
- return static::TYPE;
- }
- public function getObjTemplateName($sp623200 = false)
- {
- return 'course/class.tpl';
- }
- public function setIDClase($sp2e5db5)
- {
- $this->IDCLASE = $sp2e5db5;
- }
- public function setIDCurso($sp2e5db5)
- {
- $this->IDCURSO = $sp2e5db5;
- }
- public function setIDTema($sp2e5db5)
- {
- $this->IDTEMA = $sp2e5db5;
- }
- public function setTipoClase($sp2e5db5)
- {
- $this->TIPO_CLASE = $sp2e5db5;
- }
- public function setEvalType($sp2e5db5)
- {
- $this->EVAL_TYPE = $sp2e5db5;
- }
- public function setRepeatable($sp2e5db5)
- {
- $this->REPEATABLE = $sp2e5db5;
- }
- public function setSecuencia($sp2e5db5)
- {
- $this->SECUENCIA = $sp2e5db5;
- }
- public function setOrden($sp2e5db5)
- {
- $this->ORDEN = $sp2e5db5;
- }
- public function setDescripcion($sp2e5db5)
- {
- $this->DESCRIPCION = $sp2e5db5;
- }
- public function setCodigoCorto($sp2e5db5)
- {
- $this->CODIGO_CORTO = $sp2e5db5;
- }
- public function setTiempoLimite($sp2e5db5)
- {
- $this->TIEMPOLIMITE = $sp2e5db5;
- }
- public function setVisible($sp2e5db5)
- {
- $this->VISIBLE = $sp2e5db5;
- }
- public function setBorrado($sp2e5db5)
- {
- $this->BORRADO = $sp2e5db5;
- }
- public function setPonderacion($sp2e5db5)
- {
- $this->PONDERACION = $sp2e5db5;
- }
- public function setExtra($sp2e5db5)
- {
- $this->EXTRA = ObjectFactory::invokeStatic(ObjectFactory::Course)->adjustPath($sp2e5db5, false);
- }
- public function setFirstPageAlign($sp2e5db5)
- {
- $spf7d841 = explode(',', $this->EXTRA);
- if (4 < count($spf7d841)) {
- $spf7d841[5] = $sp2e5db5;
- $this->EXTRA = implode(',', $spf7d841);
- }
- }
- public function setPageMode($sp2e5db5)
- {
- $spf7d841 = explode(',', $this->EXTRA);
- if (7 < count($spf7d841)) {
- $spf7d841[8] = $sp2e5db5;
- $this->EXTRA = implode(',', $spf7d841);
- }
- }
- public function setPagesOffset($sp2e5db5)
- {
- $spf7d841 = explode(',', $this->EXTRA);
- $sp918dc3 = 0;
- for (; $sp918dc3 <= 9; $sp918dc3++) {
- if (!array_key_exists($sp918dc3, $spf7d841)) {
- $spf7d841[$sp918dc3] = '';
- }
- }
- $spf7d841[9] = $sp2e5db5;
- $this->EXTRA = implode(',', $spf7d841);
- }
- public function setImagen($sp2e5db5)
- {
- $this->IMAGEN = $sp2e5db5;
- }
- public function setSettings($sp2e5db5)
- {
- $this->SETTINGS = $sp2e5db5;
- }
- public function setIDClaseExt($sp2e5db5)
- {
- $this->IDCLASE_EXT = $sp2e5db5;
- }
- public function setNivelIndice($sp2e5db5)
- {
- $this->NIVEL_INDICE = $sp2e5db5;
- }
- public function setIDUsuarioAutor($sp2e5db5)
- {
- $this->IDUSUARIOAUTOR = $sp2e5db5;
- }
- public function setIDUserOwner($sp2e5db5)
- {
- $this->IDUSEROWNER = $sp2e5db5;
- }
- public function setIDTipoLicencia($sp2e5db5)
- {
- $this->IDTIPOLICENCIA = $sp2e5db5;
- }
- public function setLicencia($sp2e5db5)
- {
- $this->LICENCIA = $sp2e5db5;
- }
- public function setOnline($sp2e5db5)
- {
- $this->ONLINE = $sp2e5db5;
- }
- public function setBloqueado($sp2e5db5)
- {
- $this->BLOQUEADO = $sp2e5db5;
- }
- public function setTipoContenido($sp2e5db5)
- {
- $this->TIPO_CONTENIDO = $sp2e5db5;
- }
- public function setIDClaseOriginal($sp2e5db5)
- {
- $this->IDCLASEORIGINAL = $sp2e5db5;
- }
- public function setFilter($sp2e5db5)
- {
- $this->FILTER = $sp2e5db5;
- }
- public function setCommitComplete($sp2e5db5)
- {
- $this->COMMITCOMPLETE = $sp2e5db5;
- }
- public function setIsResource($sp2e5db5)
- {
- $this->ISRESOURCE = $sp2e5db5;
- }
- public function setScormVersion($sp2e5db5)
- {
- $this->SCORM_VERSION = $sp2e5db5;
- }
- public function setScormID($sp2e5db5)
- {
- $this->setSettings($sp2e5db5);
- }
- public function getID()
- {
- return $this->IDCLASE;
- }
- public function getIDClase()
- {
- return $this->IDCLASE;
- }
- public function getIDCurso()
- {
- return $this->getIDCustomization() ? $this->getIDCustomization() : $this->IDCURSO;
- }
- public function getIDTema()
- {
- return $this->IDTEMA;
- }
- public function getTema()
- {
- return ObjectFactory::invokeStatic(ObjectFactory::Section)->getObjectFromID($this->getIDTema(), $this->getIDCustomization());
- }
- public function getTipoClase()
- {
- return $this->TIPO_CLASE;
- }
- public function getEvalType()
- {
- return $this->EVAL_TYPE;
- }
- public function getRepeatable()
- {
- return $this->REPEATABLE;
- }
- public function esAccesoEditorial()
- {
- return strpos($this->EXTRA, 'accesoContenidoEditorial.php') !== false;
- }
- public function esWebExterna()
- {
- return ($this->TIPO_CLASE == TIPO_CLASE_WEB) && ((strpos($this->EXTRA, '://') !== false) || $this->esAccesoEditorial());
- }
- public function esArchivo()
- {
- return ($this->TIPO_CLASE == TIPO_CLASE_WEB) && !$this->esWebExterna();
- }
- public function esArchivoHtml()
- {
- if (!$this->esArchivo()) {
- return false;
- }
- $spcd353a = getExt($this->EXTRA, true);
- return ($spcd353a == 'htm') || ($spcd353a == 'html');
- }
- public function esScorm()
- {
- return ($this->TIPO_CLASE == TIPO_CLASE_WEB) && ObjectFactory::invokeStatic(ObjectFactory::File)->isSCORMLogicalPath($this->EXTRA);
- }
- public function esArchivoEpub()
- {
- if (!$this->esArchivo()) {
- return false;
- }
- $spcd353a = getExt($this->EXTRA, true);
- return ($spcd353a == 'epub') || ($spcd353a == 'bpub');
- }
- public function esDeber()
- {
- return $this->EVAL_TYPE == EVAL_TYPE_HOMEWORK;
- }
- public function esIndiceCurso()
- {
- $sp0dadf9 = $this->getCurso();
- if ($sp0dadf9 == NULL) {
- return false;
- }
- return $this->IDCLASE === $sp0dadf9->getIDCourseIndex();
- }
- public function visualizarEnPopup()
- {
- return $this->esAccesoEditorial();
- }
- public function esActividadBlink()
- {
- return $this->TIPO_CLASE == TIPO_CLASE_EJERCICIO;
- }
- public function esLibroDigital()
- {
- return $this->TIPO_CLASE == TIPO_CLASE_LIBRO_DIGITAL;
- }
- public function esEvaluable()
- {
- return $this->EVAL_TYPE != EVAL_TYPE_NOEVAL;
- }
- public function hasMediaResources()
- {
- return $this->HAS_MEDIARESOURCES;
- }
- public function getExtraInfo()
- {
- if ($this->EXTRA != '') {
- if ($this->esAccesoEditorial()) {
- return '';
- }
- if ($this->TIPO_CLASE == TIPO_CLASE_LIBRO_DIGITAL) {
- $sp78b2d4 = explode(',', $this->EXTRA);
- return $sp78b2d4[0];
- }
- else if (!$this->esWebExterna()) {
- $spab9529 = pathinfo($this->EXTRA);
- return $spab9529['basename'];
- }
- }
- return '';
- }
- public function getNombre($sp4b7347 = false)
- {
- if (($this->NOMBRE == '') && $sp4b7347) {
- return $this->getCurso('nombre');
- }
- else {
- return $this->NOMBRE;
- }
- }
- public function getSecuencia()
- {
- return $this->SECUENCIA;
- }
- public function getSecuenciaArray()
- {
- return $this->SECUENCIA ? explode(',', $this->SECUENCIA) : array();
- }
- public function getOrden()
- {
- return $this->ORDEN;
- }
- public function getDescripcion()
- {
- return $this->DESCRIPCION;
- }
- public function getDescripcionRepositorio()
- {
- $sp98650a = $this->DESCRIPCION;
- if ($sp98650a == '') {
- if ($this->getIDCurso()) {
- $sp98650a = $this->getCurso('desc');
- }
- }
- if ($this->autorEsEditorial()) {
- return $sp98650a;
- }
- if ($sp98650a == '') {
- if ($this->esWebExterna()) {
- $sp98650a = 'URL: ' . $this->EXTRA;
- }
- else if ($this->esArchivo()) {
- $spc93183 = $this->EXTRA;
- $sp0b14d3 = strrpos($spc93183, '/');
- if (($sp0b14d3 !== false) && ($sp0b14d3 < strlen($spc93183))) {
- $spc93183 = substr($spc93183, $sp0b14d3 + 1);
- $sp98650a = $spc93183;
- }
- }
- }
- return $sp98650a;
- }
- public function getCodigoCorto()
- {
- return $this->CODIGO_CORTO;
- }
- public function getDominio()
- {
- if (!$this->DOMINIO && $this->IDCURSO) {
- return $this->getCurso('dominio');
- }
- else {
- return $this->DOMINIO;
- }
- }
- public function getTiempoLimite()
- {
- return $this->TIEMPOLIMITE;
- }
- public function getVisible()
- {
- return $this->VISIBLE;
- }
- public function getBorrado()
- {
- return $this->BORRADO;
- }
- public function getPonderacion()
- {
- return $this->PONDERACION;
- }
- public function getNumCopys()
- {
- $sp93737d = parent::getNumCopys();
- if ($sp93737d === false) {
- $sp93737d = parent::getNumCopysFromDB($this->getIDCurso(), $this->getID());
- $this->NUM_COPYS = $sp93737d;
- }
- return $sp93737d;
- }
- public function getIdLtiContentProvider()
- {
- if (($this->TIPO_CLASE == TIPO_CLASE_WEB) && !$this->SCORM_VERSION) {
- if (filter_var($this->SETTINGS, FILTER_VALIDATE_INT) !== false) {
- return $this->SETTINGS;
- }
- else {
- return false;
- }
- }
- else {
- return false;
- }
- }
- public function getExtra($sp609aa4 = false, $speb65b5 = false, $sp08cf82 = true)
- {
- $sp96fff3 = $this->EXTRA;
- $sp609aa4 &= strpos($sp96fff3, '/coursePlayer/') === false;
- $sp4a0429 = false;
- if ($sp609aa4) {
- $sp3af454 = explode(',', $sp96fff3);
- if (2 < count($sp3af454)) {
- $sp7a5ed8 = $sp96fff3;
- $sp4a0429 = true;
- $sp96fff3 = $sp3af454[1];
- $sp8b2e21 = $sp96fff3;
- }
- if ((strpos($sp96fff3, '/' . FILE_SCORM_DIRNAME) !== false) || (strpos($sp96fff3, '/' . FILE_OTHER_IMPORTED_DIRNAME) !== false) || (strpos($sp96fff3, '/' . FILE_IMPORTED_DIRNAME) !== false)) {
- $spbaf621 = FILE_COURSE_APP_NAME;
- $sp57387f = $this->getIDCurso();
- }
- else {
- $spbaf621 = FILE_ACTIVITY_APP_NAME;
- $sp57387f = $this->getID();
- }
- $spdad0c6 = false;
- $sp96fff3 = ObjectFactory::invokeStatic(ObjectFactory::File)->getLogicalPath_forResource($sp96fff3, $spbaf621, $sp57387f, false, false, $speb65b5, $spdad0c6, $sp08cf82);
- if ($sp4a0429) {
- $sp96fff3 = str_replace($sp8b2e21, $sp96fff3, $sp7a5ed8);
- }
- }
- return $sp96fff3;
- }
- public function addLTIProviderContext($sp6b32ee)
- {
- if (strpos($sp6b32ee, '/coursePlayer/accessLTIProvider.php?') !== false) {
- $sp6b32ee = str_replace('accessLTIProvider.php?', 'accessLTIProvider.php?idcurso=' . $this->IDCURSO . '&idtema=' . $this->IDTEMA . '&idclase=' . $this->IDCLASE . '&', $sp6b32ee);
- }
- return $sp6b32ee;
- }
- public function getFirstPageAlign()
- {
- $spf7d841 = explode(',', $this->EXTRA);
- return array_key_exists(5, $spf7d841) ? $spf7d841[5] : '';
- }
- public function getPageMode()
- {
- $spf7d841 = explode(',', $this->EXTRA);
- return array_key_exists(8, $spf7d841) ? $spf7d841[8] : 'default';
- }
- public function getPagesOffset()
- {
- $spf7d841 = explode(',', $this->EXTRA);
- return array_key_exists(9, $spf7d841) ? $spf7d841[9] : '';
- }
- public function getImagen($sp609aa4 = false)
- {
- $sp93579f = $this->IMAGEN;
- if ($sp609aa4 && (strpos($this->IMAGEN, '://') === false)) {
- $spbaf621 = FILE_ACTIVITY_APP_NAME;
- $sp57387f = $this->getID();
- $sp93579f = ObjectFactory::invokeStatic(ObjectFactory::File)->getLogicalPath_forResource($sp93579f, $spbaf621, $sp57387f);
- }
- return $sp93579f;
- }
- public function getImagenOrIcon()
- {
- if ($this->IMAGEN == '') {
- $this->setImagenAleatoria();
- }
- if ($this->IMAGEN != '') {
- return $this->getImagen(true);
- }
- if ($this->TIPO_CLASE == TIPO_CLASE_WEB) {
- if (strpos($this->EXTRA, '://') !== false) {
- return '../images/i/iconos/docu_maxi.png';
- }
- return '../images/i/iconos/enlace_maxi.png';
- }
- return '../images/i/iconos/docu.png';
- }
- public function getThumbnailFilePathCustom($spe9dd93 = 0, $sp5bfe65 = 0, $sp77bd94 = false)
- {
- if (($spe9dd93 == 0) && ($sp5bfe65 == 0) && !$sp77bd94 && isset($this->_imagePath)) {
- return $this->_imagePath;
- }
- if (($spe9dd93 == static::THUMBNAIL_DEFAULT_WIDTH) && ($sp5bfe65 == static::THUMBNAIL_DEFAULT_HEIGHT) && !$sp77bd94 && isset($this->_imagePath_thumbnail)) {
- return $this->_imagePath_thumbnail;
- }
- if ($this->IMAGEN == '') {
- return $this->getImagenOrIcon();
- }
- if (strpos($this->IMAGEN, '://') !== false) {
- return $this->IMAGEN;
- }
- global $prefijoURL;
- if (startsWith($this->IMAGEN, '/images/default') || startsWith($this->IMAGEN, '/images/common')) {
- return $prefijoURL . $this->IMAGEN;
- }
- $sp3af454 = pathinfo($this->IMAGEN);
- if ((strpos($this->IMAGEN, FILE_RESOURCES_PATH) !== false) || (strpos($this->IMAGEN, '/' . FILE_RESOURCES_SHORT_PATH) !== false)) {
- $spa38187 = ObjectFactory::invokeStatic(ObjectFactory::File)->getFileFromPath($this->IMAGEN, FILE_ACTIVITY_APP_NAME, $this->getID());
- }
- else {
- $spa38187 = ObjectFactory::invokeStatic(ObjectFactory::File)->getFileFromPath($this->IMAGEN);
- }
- if (!$spa38187) {
- if ($this->getIDClaseOriginal()) {
- $spa38187 = ObjectFactory::invokeStatic(ObjectFactory::File)->getFileFromPath($this->IMAGEN, FILE_ACTIVITY_APP_NAME, $this->getIDClaseOriginal());
- }
- }
- $sp57286e = '';
- if ($spa38187) {
- if (($spe9dd93 == 0) && ($sp5bfe65 == 0)) {
- $sp57286e = $spa38187->getLogicalName();
- }
- else {
- $sp57286e = $spa38187->getThumbnail($spe9dd93, $sp5bfe65, false);
- if (!$sp57286e) {
- $sp57286e = '';
- }
- }
- }
- else {
- $sp57286e = $this->getImagenOrIcon();
- }
- if (($spe9dd93 == 0) && ($sp5bfe65 == 0) && !$sp77bd94 && !isset($this->_imagePath)) {
- $this->_imagePath = $sp57286e;
- }
- if (($spe9dd93 == static::THUMBNAIL_DEFAULT_WIDTH) && ($sp5bfe65 == static::THUMBNAIL_DEFAULT_HEIGHT) && !$sp77bd94 && !isset($this->_imagePath_thumbnail)) {
- $this->_imagePath_thumbnail = $sp57286e;
- }
- return $sp57286e;
- }
- public function getThumbnailFilePathDefault($sp77bd94 = false)
- {
- return $this->getThumbnailFilePathCustom(static::THUMBNAIL_DEFAULT_WIDTH, static::THUMBNAIL_DEFAULT_HEIGHT, $sp77bd94);
- }
- public function getThumbnailFilePathAttachment($sp77bd94 = false)
- {
- return $this->getThumbnailFilePathCustom(static::THUMBNAIL_ATTACHMENT_WIDTH, static::THUMBNAIL_ATTACHMENT_HEIGHT, $sp77bd94);
- }
- public function getThumbnailFilePathResource($sp77bd94 = false)
- {
- return $this->getThumbnailFilePathCustom(static::THUMBNAIL_RESOURCE_WIDTH, static::THUMBNAIL_RESOURCE_HEIGHT, $sp77bd94);
- }
- public function setImagenAleatoria()
- {
- $db = BlinkFactory::getDatabase();
- $this->IMAGEN = $this->getImagenAleatoria();
- $db->execute('UPDATE blinkfw_activities SET IMAGEN=\'' . formatearParaDB($this->IMAGEN) . '\' WHERE IDCLASE=\'' . formatearParaDB($this->IDCLASE) . '\'');
- $this->_borrarObjetoCache();
- }
- public function getImagenAleatoria()
- {
- $sp2c8bd9 = $this->ImagenesAleatorias();
- return $sp2c8bd9[rand(0, count($sp2c8bd9) - 1)];
- }
- static public function ImagenesAleatorias()
- {
- return array('/images/default/water_foto_500_400.jpg', '/images/default/aquarium_foto_500_400.jpg', '/images/default/ID50854771_500_400.jpg', '/images/default/ID9218407_500_400.jpg', '/images/default/orange_tree_foto_500_400.jpg', '/images/default/bee_2_foto_500_400.jpg', '/images/default/ID47318488_500_400.jpg', '/images/default/ID50842963_500_400.jpg', '/images/default/mountain_foto_500_400.jpg', '/images/default/ID49508491_500_400.jpg');
- }
- public function tieneImagenAleatoria()
- {
- $sp2c1eac = $this->ImagenesAleatorias();
- return in_array($this->IMAGEN, $sp2c1eac);
- }
- public function getSettings()
- {
- return $this->SETTINGS;
- }
- public function getIDClaseExt()
- {
- return $this->IDCLASE_EXT;
- }
- public function getNivelIndice()
- {
- return $this->NIVEL_INDICE;
- }
- public function getIDUsuarioAutor()
- {
- return $this->IDUSUARIOAUTOR;
- .......................................................................................
- ..................................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement