当前位置: 首页>>代码示例>>PHP>>正文


PHP CopixUrl::getRequestedScriptPath方法代码示例

本文整理汇总了PHP中CopixUrl::getRequestedScriptPath方法的典型用法代码示例。如果您正苦于以下问题:PHP CopixUrl::getRequestedScriptPath方法的具体用法?PHP CopixUrl::getRequestedScriptPath怎么用?PHP CopixUrl::getRequestedScriptPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CopixUrl的用法示例。


在下文中一共展示了CopixUrl::getRequestedScriptPath方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processInstall

 /**
  * Installe le jeu d'essai
  *
  * @author Christophe Beyer <cbeyer@cap-tic.fr>
  * @since 2006/10/26
  */
 public function processInstall()
 {
     global $params;
     $db = new Demo_DB();
     $tools = new Demo_Tools();
     $db->extract_db_infos();
     $db->db_connect();
     $fileSQL = '../instal/demo/jeu_essai.sql';
     $errors = array();
     if (CopixConfig::get('kernel|jeuEssaiInstalled') == 1) {
         $errors[] = CopixI18N::get('sysutils|demo.error.alreadyInstalled');
     } elseif (!is_file($fileSQL)) {
         $errors[] = CopixI18N::get('sysutils|demo.error.noFileSql');
     }
     if ($errors) {
         return CopixActionGroup::process('genericTools|Messages::getError', array('message' => implode('<br/>', $errors), 'back' => CopixUrl::get()));
     }
     $contents = file_get_contents($fileSQL);
     $lines = explode(";\n", $contents);
     $path = CopixUrl::getRequestedScriptPath();
     foreach ($lines as $line) {
         $line = trim($line);
         if ($line) {
             $line = str_replace('<PATH>', $path, $line);
             // print_r("<br>***line=".$line);
             $db->run_query($line);
         }
     }
     $db->db_close();
     // Copie des dossiers (pas de slashs à la fin!)
     $tools->installFolder('www/static/malle/2_9a4ba0cdef');
     $tools->installFolder('var/data/blog/logos');
     $tools->installFolder('www/static/album/2_be8550b87c');
     $tools->installFolder('www/static/album/3_cf057489c9');
     $tools->installFolder('www/static/album/4_c996b6cf13');
     $tools->installFolder('www/static/prefs/avatar');
     // Fin
     CopixConfig::set('kernel|jeuEssaiInstalled', 1);
     // Vidage de cache
     CacheServices::clearCache();
     CacheServices::clearConfDB();
     $tpl = new CopixTpl();
     $tpl->assign('TITLE_PAGE', CopixI18N::get('sysutils|demo.titlePage'));
     $tplDemo = new CopixTpl();
     //$tplDemo->assign ("toto", 1);
     $tplDemo->assign('demo_txt_installed', CopixI18N::get('sysutils|demo.txt.installed'));
     $tplDemo->assign('demo_txt_accounts', CopixI18N::get('sysutils|demo.txt.accounts'));
     $tpl->assign("MAIN", $tplDemo->fetch("demo_install.tpl"));
     $tpl->assign('MENU', Admin::getMenu('demo'));
     return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:57,代码来源:demo.actiongroup.php

示例2: Copyright

    Copyright (c) 2010 CAP-TIC <http://www.cap-tic.fr>
*/
include_once COPIX_PROJECT_PATH . "themes/default/helper.php";
$module = CopixRequest::get('module');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

<head profile="http://www.w3.org/2005/10/profile">
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
    <title><?php 
echo isset($TITLE_BAR) ? $TITLE_BAR : '';
?>
</title>
    <link rel="icon" type="image/x-icon" href="<?php 
echo CopixUrl::getRequestedScriptPath();
?>
favicon.ico" />

    <?php 
include_once COPIX_PROJECT_PATH . "themes/default/styles.php";
?>
        <?php 
include_once COPIX_PROJECT_PATH . "themes/default/scripts.php";
?>
        <?php 
echo $HTML_HEAD;
?>


</head>
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:31,代码来源:main.php

示例3: iconito_multimedia

function iconito_multimedia($contents, $attr)
{
    $mode = 'auto';
    $cnt = count($contents);
    if ($cnt > 2) {
        $cnt = 2;
    }
    //print_r($contents);
    switch ($cnt) {
        case 2:
            $mode = $contents[1];
        case 1:
        default:
            $file = rawurldecode($contents[0]);
            if ($mode == 'download') {
                $path = COPIX_WWW_PATH . substr($file, strpos($file, 'static'));
                if (file_exists($path) || fopen($path, 'r')) {
                    $size = @filesize($path);
                    $size = $size ? ' - ' . KernelMalle::human_file_size($size) : '';
                    $point = strrpos($file, ".");
                    if ($point !== false) {
                        $ext = substr($file, $point + 1);
                    }
                    $ext = MalleService::getTypeInfos($ext);
                    $pos = strrpos($file, '/');
                    if ($pos === false) {
                        $name = $file;
                        $href = $name;
                    } else {
                        $name = substr($file, $pos + 1);
                        $href = substr($file, 0, $pos + 1) . rawurlencode($name);
                    }
                    if (strlen($name) > 35) {
                        $name = substr($name, 0, 35) . '...';
                    }
                    //        print_r();
                    $ret = '<div class="file_dl"><a href="' . $href . '" title="' . htmlentities($file) . '"><img src="' . _resource('img/malle/' . $ext['type_icon32']) . '" width="32" height="32" border="0" title="' . htmlentities($ext['type_text']) . '" alt="' . htmlentities($ext['type_text']) . '" /><div class="name">' . $name . '</div></a><div class="desc">' . $ext['type_text'] . '' . $size . '</div></div>';
                } else {
                    $ret = '<div>Fichier ' . $file . ' introuvable</div>';
                }
            } elseif ($mode == 'view') {
                $point = strrpos($file, ".");
                if ($point !== false) {
                    $ext = substr($file, $point + 1);
                }
                //print_r("ext=$ext");
                switch (strtolower($ext)) {
                    case "jpg":
                    case "jpeg":
                    case "gif":
                    case "png":
                    case "bmp":
                        $link = array($file, 'image');
                        break;
                    case "mp3":
                        $link = array($file, 'mp3');
                        break;
                    case "wmv":
                    case "mpg":
                    case "mpeg":
                    case "avi":
                        $link = array($file, 'wmv');
                        break;
                    case "mov":
                    case "mp4":
                    case "m4a":
                        $link = array($file, 'mov');
                        break;
                    case "amr":
                        $link = array($file, 'amr');
                        break;
                    case "flv":
                        $link = array($file, 'flv');
                        break;
                    default:
                        $path = $_SERVER['PHP_SELF'];
                        $pos = strrpos($path, "/");
                        if ($pos !== false) {
                            $abspath = substr($path, 0, $pos + 1);
                        }
                        if (substr($file, 0, strlen($abspath)) == $abspath) {
                            $file = substr($file, strlen($abspath));
                        }
                        $link = array($file, 'download');
                }
                $ret = iconito_multimedia($link, NULL);
            } elseif ($mode == 'mp3') {
                $width = 200;
                $height = 20;
                $ret = '<div><object type="application/x-shockwave-flash" data="' . CopixUrl::getRequestedScriptPath() . 'dewplayer/dewplayer.swf?son=' . $file . '" width="' . $width . '" height="' . $height . '"> <param name="movie" value="' . CopixUrl::getRequestedScriptPath() . 'dewplayer/dewplayer.swf?son=' . $file . '" /><img src="' . _resource('img/music.png') . '" width="16" height="16" border="0" title="MP3" alt="MP3" /></object></div>';
            } elseif ($mode == 'wmv') {
                $id = "media-Player" . md5(mt_rand());
                $width = 480;
                $height = 385;
                $ret = '<div><object id="' . $id . '" width="' . $width . '" height="' . $height . '"
      classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
      codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
      standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
      <param name="fileName" value="' . $file . '">
      <param name="animationatStart" value="true">
//.........这里部分代码省略.........
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:101,代码来源:WikiIconito.lib.php

示例4: _createContent

 /**
  * Affiche des photos d'un album
  *
  * @author Christophe Beyer <cbeyer@cap-tic.fr>
  * @since 2008/11/10
  * @param string $titre Titre a donner a la zone
  * @param string $mode Mode utilise. Uniquement dewslider pour l'instant
  * @param integer $album Id de l'album ou on pioche
  * @param integer $dossier Id du dossier de l'album ou on pioche
  * @param integer $width Largeur du player, en pixels
  * @param integer $height Hauteur du player, en pixels
  * @param boolean $legendes Si on affiche ou pas les legendes de chaque photo
  */
 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $annuaireService =& CopixClassesFactory::Create('annuaire|AnnuaireService');
     // Récupération des paramètres
     $titre = $this->getParam('titre');
     $mode = $this->getParam('mode');
     $classeur = intval($this->getParam('classeur'));
     $album = intval($this->getParam('album'));
     $dossier = intval($this->getParam('dossier'));
     $width = intval($this->getParam('width'));
     $height = intval($this->getParam('height'));
     $legendes = $this->getParam('legendes');
     // Classeur
     if ($classeur != 0) {
         $classeur_dao = _dao('classeur|classeur');
         $nbPhotos = 0;
         if ($rClasseur = $classeur_dao->get($classeur)) {
             $fichier_dao = _dao('classeur|classeurfichier');
             $photolist = $fichier_dao->getParDossier($rClasseur->id, $dossier);
             $nbPhotos = count($photolist);
             if ($nbPhotos > 0) {
                 if ($mode == 'dewslider') {
                     $arPhotos = array();
                     foreach ($photolist as $photo) {
                         if ($photo->estUneImage()) {
                             $arPhotos[] = $photo;
                         }
                     }
                     generateClasseurDewsliderXml($rClasseur, $arPhotos, $width, $legendes);
                     $tpl->assign('rClasseur', $rClasseur);
                 }
                 if ($mode == 'js') {
                     $this->addJs('js/iconito/slideshow.js');
                     $this->addJs('js/iconito/module_welcome.js');
                     foreach ($photolist as $photo) {
                         if ($photo->estUneImage()) {
                             $arPhotos[] = array('file' => $photo->getLienMiniature($width, ''), 'title' => $photo->titre);
                         }
                     }
                     $tpl->assign('photolist', $arPhotos);
                 }
             }
         }
     } elseif ($album != 0) {
         $album_dao = _dao('album|album');
         $nbPhotos = 0;
         if ($rAlbum = $album_dao->get($album)) {
             $photo_dao = _dao('album|photo');
             $photolist = $photo_dao->findAllByAlbumAndFolder($album, $dossier);
             $nbPhotos = count($photolist);
             if ($nbPhotos > 0) {
                 if ($mode == 'dewslider') {
                     foreach ($photolist as $key => $photo) {
                         $photolist[$key]->folder = CopixUrl::getRequestedScriptPath() . 'static/album/' . $photo->album_id . '_' . $photo->album_cle;
                         $photolist[$key]->file = $photo->photo_id . '_' . $photo->photo_cle . '_' . $width . '.' . $photo->photo_ext;
                     }
                     generateAlbumDewsliderXml($rAlbum, $photolist, $width, $legendes);
                     $tpl->assign('rAlbum', $rAlbum);
                 }
             }
         }
     }
     $tpl->assign('mode', $mode);
     $tpl->assign('titre', $titre);
     $tpl->assign('width', $width);
     $tpl->assign('height', $height);
     $tpl->assign('nbPhotos', $nbPhotos);
     if ($nbPhotos > 0) {
         $toReturn = $tpl->fetch('zone_photos.tpl');
     }
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:86,代码来源:photos.zone.php


注:本文中的CopixUrl::getRequestedScriptPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。