Exemplo n.º 1
0
function install($rootFolder)
{
    out('Installing');
    chdir("{$rootFolder}/htdocs");
    getFile("{$rootFolder}/htdocs/dashboard.php", "https://raw.github.com/gist/1512137/dashboard.php");
    return true;
}
Exemplo n.º 2
0
function replaceIncludeCallback($matches)
{
    $path = $matches[1];
    $contents = getFile($path, true);
    $result = $contents;
    return $result;
}
Exemplo n.º 3
0
function getDirFiles($dir)
{
    global $quiz;
    $files = array();
    $i = 0;
    $d = dir($dir);
    $short_dir = str_replace($quiz->getDir(), "", $dir);
    while (false !== ($entry = $d->read())) {
        if ($entry[0] != '.') {
            $files[$i++] = $entry;
        }
    }
    $tab_fic = array();
    sort($files);
    foreach ($files as $nb => $file) {
        $fic = getFile($short_dir, $file);
        $keys = array_keys($fic);
        $key = $keys[0];
        if (!array_key_exists($key, $tab_fic)) {
            $tab_fic[$key] = array();
        }
        array_push($tab_fic[$key], $fic[$key]);
    }
    return $tab_fic;
}
Exemplo n.º 4
0
 function getHTMLinjector()
 {
     $path = "widgets/" . $this->id . "/" . $this->html;
     if ($this->html == null || $this->html == "") {
         return "//Not HTML file includedc in the JSON config file.";
     }
     if (file_exists($path)) {
         $html = str_replace("\n", "", getFile($path, true));
         $html = str_replace("'", "\"", $html);
         //replacing the tags
         if ($this->tags != null) {
             foreach ($this->tags as $key => $value) {
                 $html = str_replace("{" . $key . "}", $value, $html);
             }
         }
         //$htmlT="var htmlTemplate = '".$htmlT."';\n";
         //$htmlT .= "var target='".$this->templateTarget."';\n";
         $htmlT = "(function (\$) { \n";
         $htmlT .= "\t\$(function () { \n";
         $htmlT .= "\t\t\$('." . $this->templateTarget . "').append('" . $html . "'); \n";
         $htmlT .= "\t}); \n";
         $htmlT .= "})(jQuery);\n";
         return $htmlT;
     }
     throw new RuntimeException("HTML file(" . $path . ") couldnt be opened");
 }
Exemplo n.º 5
0
function introAdk()
{
    global $context, $txt;
    $context['sub_template'] = 'introAdk';
    $context['page_title'] = $txt['adkmod_modules_intro'];
    global $sourcedir;
    require_once $sourcedir . '/Subs-Package.php';
    $context['file'] = getFile('http://www.smfpersonal.net/xml/read_modules.php');
}
Exemplo n.º 6
0
function result()
{
    $RESULT = getFile($RESULT);
    echo '<TABLE width="100%">';
    echo '<tr><td>' . count($RESULT) . '</td></tr>';
    foreach ($RESULT as $item) {
        echo "<tr><td>" . $item . "</td></tr>/n";
    }
    echo '</TABLE>';
}
Exemplo n.º 7
0
function delWords($n = NULL)
{
    if (!is_null($n) and is_numeric($n)) {
        $text = getFile();
        foreach ($text as $k => $v) {
            if ($n < mb_strlen($text[$k])) {
                unset($text[$k]);
            }
        }
        file_put_contents("./words", implode(" ", $text));
    }
}
Exemplo n.º 8
0
function getFile($dir)
{
    $dp = opendir($dir);
    $fileArr = array();
    while (!false == ($curFile = readdir($dp))) {
        if ($curFile != "." && $curFile != ".." && $curFile != "") {
            if (is_dir($curFile)) {
                $fileArr = getFile($dir . "/" . $curFile);
            } else {
                $fileArr[] = $dir . "/" . $curFile;
            }
        }
    }
    return $fileArr;
}
Exemplo n.º 9
0
function getInvitationTemplate($_requestid, $_internid, $_sessid, $_name, $_groupid)
{
    global $CONFIG;
    $template = !@file_exists(FILE_INVITATIONLOGO) ? getFile(TEMPLATE_SCRIPT_INVITATION) : getFile(TEMPLATE_SCRIPT_INVITATION_LOGO);
    $template = str_replace("<!--request_id-->", $_requestid, $template);
    $template = str_replace("<!--site_name-->", $CONFIG["gl_site_name"], $template);
    $template = str_replace("<!--sess_id-->", $_sessid, $template);
    $template = str_replace("<!--intern_name-->", $_name, $template);
    $template = str_replace("<!--group_id-->", base64UrlEncode($_groupid), $template);
    $template = str_replace("<!--intern_id-->", base64UrlEncode($_internid), $template);
    $template = str_replace("<!--width-->", $CONFIG["wcl_window_width"], $template);
    $template = str_replace("<!--height-->", $CONFIG["wcl_window_height"], $template);
    $template = str_replace("<!--server-->", LIVEZILLA_URL, $template);
    $template = str_replace("<!--intern_image-->", file_exists(PATH_INTERN_IMAGES . md5($_internid) . FILE_EXTENSION_PROFILE_PICTURE) ? md5($_internid) . FILE_EXTENSION_PROFILE_PICTURE . "?acid=" . uniqid(rand()) : "nopic" . FILE_EXTENSION_PROFILE_PICTURE, $template);
    return doReplacements($template);
}
Exemplo n.º 10
0
function makeArrayFromFile($path)
{
    $data = getFile($path);
    $opt_array = array();
    foreach ($data as $key => $val) {
        if (!in_array($key, array(0, 31))) {
            $data = explode(" ", $val);
            foreach ($data as $d => $v) {
                $tmp = trim($v);
                if (!empty($tmp) && strlen($tmp)) {
                    $opt_array[$key][] = $tmp;
                }
            }
        }
    }
    return $opt_array;
}
Exemplo n.º 11
0
function __autoload($name)
{
    try {
        $file = getFile($name);
        if ($file !== NULL) {
            include $file;
        } else {
            throw new Exception('Die Klasse <font color="red">' . $name . '</font> wurde nicht gefunden.');
        }
        if (!class_exists($name)) {
            throw new Exception('Die Datei <b>' . $file . '</b> enth&auml;lt nicht die Klasse <font color="red">' . $name . '</font>');
        }
        return true;
    } catch (Exception $error) {
        die($error->getMessage());
    }
}
Exemplo n.º 12
0
 function Generate()
 {
     foreach ($this->InternalGroups as $groupId => $group) {
         $this->XMLGroups .= "<v id=\"" . base64_encode($groupId) . "\" desc=\"" . base64_encode($group["gr_desc_array"]) . "\" created=\"" . base64_encode($group["gr_created"]) . "\"  email=\"" . base64_encode($group["gr_email"]) . "\"  extern=\"" . base64_encode($group["gr_extern"]) . "\" standard=\"" . base64_encode($group["gr_standard"]) . "\" vf=\"" . base64_encode($group["gr_vfilters"]) . "\">\r\n";
         foreach ($group["gr_predefined"] as $premes) {
             $this->XMLGroups .= $premes->GetXML();
         }
         $this->XMLGroups .= "</v>\r\n";
     }
     foreach ($this->InternalUsers as $sysId => $internaluser) {
         $b64sysId = base64_encode($sysId);
         $sessiontime = getDataSetTime($this->Caller->SessionFile);
         if (file_exists($this->InternalUsers[$sysId]->PictureFile)) {
             if ($_POST[POST_INTERN_XMLCLIP_HASH_PICTURES_PROFILE] == XML_CLIP_NULL || @filemtime($this->InternalUsers[$sysId]->PictureFile) >= $sessiontime) {
                 $this->XMLProfilePictures .= "<v os=\"" . $b64sysId . "\" content=\"" . fileToBase64($this->InternalUsers[$sysId]->PictureFile) . "\" />\r\n";
             }
         } else {
             $this->XMLProfilePictures .= "<v os=\"" . $b64sysId . "\" content=\"" . base64_encode("") . "\" />\r\n";
         }
         if ($sysId != CALLER_SYSTEM_ID && file_exists($this->InternalUsers[$sysId]->WebcamFile)) {
             if ($_POST[POST_INTERN_XMLCLIP_HASH_PICTURES_PROFILE] == XML_CLIP_NULL || @filemtime($this->InternalUsers[$sysId]->WebcamFile) >= $sessiontime) {
                 $this->XMLWebcamPictures .= "<v os=\"" . $b64sysId . "\" content=\"" . fileToBase64($this->InternalUsers[$sysId]->WebcamFile) . "\" />\r\n";
             }
         } else {
             $this->XMLWebcamPictures .= "<v os=\"" . $b64sysId . "\" content=\"" . base64_encode("") . "\" />\r\n";
         }
         $CPONL = $this->InternalUsers[CALLER_SYSTEM_ID]->Level == USER_LEVEL_ADMIN ? " cponl=\"" . base64_encode($internaluser->IsPasswordChangeNeeded() ? 1 : 0) . "\"" : "";
         $PASSWORD = SERVERSETUP ? " pass=\"" . base64_encode($this->InternalUsers[$sysId]->LoadPassword()) . "\"" : "";
         $this->XMLInternal .= "<v status=\"" . base64_encode($this->InternalUsers[$sysId]->Status) . "\" id=\"" . $b64sysId . "\" userid=\"" . base64_encode($this->InternalUsers[$sysId]->UserId) . "\" email=\"" . base64_encode($this->InternalUsers[$sysId]->Email) . "\" websp=\"" . base64_encode($this->InternalUsers[$sysId]->Webspace) . "\" name=\"" . base64_encode($this->InternalUsers[$sysId]->Fullname) . "\" desc=\"" . base64_encode($this->InternalUsers[$sysId]->Description) . "\" groups=\"" . base64_encode($this->InternalUsers[$sysId]->GroupsArray) . "\" perms=\"" . base64_encode($this->InternalUsers[$sysId]->PermissionSet) . "\" ip=\"" . base64_encode($this->InternalUsers[$sysId]->IP) . "\" level=\"" . base64_encode($this->InternalUsers[$sysId]->Level) . "\" " . $CPONL . " " . $PASSWORD . ">\r\n";
         foreach ($internaluser->PredefinedMessages as $premes) {
             $this->XMLInternal .= $premes->GetXML();
         }
         $this->XMLInternal .= "</v>\r\n";
         if ($sysId != $this->Caller->SystemId && $this->InternalUsers[$sysId]->Status != USER_STATUS_OFFLINE) {
             $this->XMLTyping .= "<v id=\"" . $b64sysId . "\" tp=\"" . base64_encode($this->Caller->SystemId === $this->InternalUsers[$sysId]->Typing ? 1 : 0) . "\" />\r\n";
         }
         if (file_exists($internaluser->VisitcardFile)) {
             if (isset($_POST[POST_INTERN_XMLCLIP_HASH_VISITCARDS]) && $_POST[POST_INTERN_XMLCLIP_HASH_VISITCARDS] == XML_CLIP_NULL || @filemtime($internaluser->VisitcardFile) >= $sessiontime) {
                 $this->XMLVisitcards .= "<v os=\"" . $b64sysId . "\" content=\"" . base64_encode(getFile($internaluser->VisitcardFile)) . "\"/>\r\n";
             } else {
                 $this->XMLVisitcards .= "<v os=\"" . $b64sysId . "\"/>\r\n";
             }
         }
     }
 }
Exemplo n.º 13
0
function getFile($dir, $dir2 = "", $fileArray = array())
{
    if (false != ($handle = opendir($dir . $dir2))) {
        while (false !== ($file = readdir($handle))) {
            //去掉"“.”、“..”以及带“.xxx”后缀的文件
            if ($file != "." && $file != "..") {
                // print_r($file."<br>");
                if (is_dir($dir . $file)) {
                    $fileArray = array_merge($fileArray, getFile($dir, $dir2 . $file . '/'));
                } else {
                    if (substr($file, -5) == ".html") {
                        $fileArray[] = $dir2 . $file;
                    }
                }
            }
        }
        //关闭句柄
        closedir($handle);
    }
    return $fileArray;
}
Exemplo n.º 14
0
function getFile($name = 'Mojo.class.php', $path = '.', $level = 0)
{
    $target = "";
    if (file_exists($path . $name)) {
        return $path . $name;
    }
    //if you have your mojo lib in a diff set of libs set them here
    $scan = array('lib', 'vendor', 'src', 'tasks', 'Mojo-Tasks', $name);
    $dh = @opendir($path);
    while (false !== ($file = @readdir($dh))) {
        if (in_array($file, $scan)) {
            if (is_dir("{$path}/{$file}")) {
                return getFile($name, $path . DIRECTORY_SEPARATOR . $file, $level + 1);
            } else {
                if ($file == $name) {
                    $target = $path . DIRECTORY_SEPARATOR . $file;
                    return realpath($target);
                }
            }
        }
    }
    @closedir($dh);
    return $target;
}
Exemplo n.º 15
0
 $class = htmlspecialchars($_GET['class']);
 $file = htmlspecialchars($_GET['file']);
 /* 获取目录数据 */
 if ($class) {
     $menus = getFile(__API__ . '/' . $class);
     if ($menus) {
         asort($menus);
     }
     $menus = $menus ?: $menus;
 } else {
     $directory = getDir(__API__);
     $menus = array();
     if ($directory) {
         asort($directory);
         foreach ($directory as $k => $v) {
             $file = getFile(__API__ . '/' . $v);
             $menus[$k]['num'] = count($file);
             $menus[$k]['name'] = $v;
         }
     } else {
         $menus = $directory;
     }
 }
 /* 读取解析文档内容 */
 if ($file) {
     $file_name = __API__ . '/' . $class . '/' . $file;
     $content = readFileText($file_name);
     $content = $content ? Parsedown::instance()->parse($content) : $content;
 } else {
     $content = '';
 }
function getTicketInputs($_html)
{
    global $CONFIG;
    $inputshtml = "";
    $inputsareahtml = "";
    $inputtpl = getFile(TEMPLATE_LOGIN_INPUT);
    $areatpl = str_replace("<!--maxlength-->", 16777216, getFile(TEMPLATE_LOGIN_AREA));
    $CONFIG["gl_ti_list"] = $CONFIG["gl_ci_list"];
    $custom_inputs = $CONFIG["gl_ti_list"];
    foreach ($custom_inputs as $index => $caption) {
        $area = false;
        if ($index == 114) {
            $area = true;
            $input = $areatpl;
        } else {
            $input = $inputtpl;
        }
        $input = str_replace("<!--name-->", $index, $input);
        $input = str_replace("<!--caption-->", $caption, $input);
        if (!$area) {
            $inputshtml .= $input;
        } else {
            $inputsareahtml .= $input;
        }
    }
    return str_replace("<!--ticket_inputs-->", $inputshtml . $inputsareahtml, $_html);
}
Exemplo n.º 17
0
		<param name="flashvars" value="trustedOrigins=getbootstrap.com%2C%2F%2Fgetbootstrap.com%2Chttp%3A%2F%2Fgetbootstrap.com">         
		<embed src="/assets/flash/ZeroClipboard.swf?noCache=1419347221407" loop="false" menu="false" quality="best" 
		bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowscriptaccess="sameDomain" 
		allowfullscreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" 
		flashvars="trustedOrigins=getbootstrap.com%2C%2F%2Fgetbootstrap.com%2Chttp%3A%2F%2Fgetbootstrap.com" scale="exactfit">                
	</object>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="1140" height="500" viewBox="0 0 1140 500" preserveAspectRatio="none" style="visibility: hidden; position: absolute; top: -100%; left: -100%;">
<defs></defs>
<text x="0" y="53" style="font-weight:bold;font-size:53pt;font-family:Arial, Helvetica, Open Sans, sans-serif;dominant-baseline:middle">
Thirdslide</text>
</svg>
<div id="status">
</div>
<div id="fb-root"></div>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-50682719-4', 'auto');
  ga('send', 'pageview');

</script>
</body>
</html>
<?php 
require_once getFile('functions/phpFuncEnd.php');
mb_internal_encoding('UTF-8');
set_time_limit("1800");
//30 min
ini_set("default_socket_timeout", "1800");
$googleKey = "AIzaSyBQTntV81uQOrj6haI8OKYqhGlAFYPAAI4";
$project = $_GET["project"];
$langpath = "./tmp/lang." . $_GET["lang_in"] . ".php";
$langnewpath = "./tmp/lang." . $_GET["lang_out"] . ".php";
require_once $langpath;
$fh = fopen($langnewpath, "w");
fputs($fh, "<?\n");
foreach ($texts as $key => $singleMessage) {
    $i++;
    $url = "https://www.googleapis.com/language/translate/v2?key={$googleKey}&q=" . urlencode($singleMessage) . "&source=" . $_GET["lang_in"] . "&target=" . $_GET["lang_out"];
    echo "Trying ... " . $url;
    $fileIn = getFile($url);
    fputs($fh, '$texts["' . $key . "\"]=\"" . getTranslation($fileIn) . '";' . "\n");
}
function getTranslation($fileIn)
{
    $arr = json_decode($fileIn);
    print_r($arr);
    return str_replace('"', '\\"', $arr->data->translations[0]->translatedText);
}
function getFile($url)
{
    $content = file($url);
    foreach ($content as $line) {
        $all .= $line . "\n";
    }
    return $all;
Exemplo n.º 19
0
 case "regenerateThumbs":
     regenerateThumbs();
     break;
 case "search":
     if (isset($_POST['terms'])) {
         search($_POST['terms']);
     }
     break;
 case "getFolder":
     if (isset($_POST['path'])) {
         getFolder($_POST['path']);
     }
     break;
 case "getFile":
     if (isset($_GET['path'])) {
         getFile($_GET['path']);
     }
     break;
 case "folderIsDeletable":
     if (isset($_POST['path'])) {
         folderIsDeletable($_POST['path']);
     }
     break;
 case "getFilePackage":
     if (isset($_GET['paths'])) {
         getFilePackage($_GET['paths']);
     }
     break;
 case "emailFilePackage":
     if (isset($_GET['fileid'], $_GET['to'], $_GET['from'], $_GET['message'])) {
         emailFilePackage($_GET['fileid'], $_GET['to'], $_GET['from'], $_GET['message']);
Exemplo n.º 20
0
 function loadArticleData()
 {
     global $config;
     if ($this->preview) {
         //get from db
         dbConnect();
         $artData = new artEditorLib();
         $artData->preview = true;
         $artData->preview = $this->preview;
         $artData->getArtFromDB($this->artId);
         $this->art = $artData->getArtString();
     } else {
         $file = $config["articleVault"] . getHash($this->artId) . "/{$this->artId}.dat";
         if ($page = getFile($file)) {
             $this->art = unserialize($page);
             //set stats
             $statLog["aid"] = $this->art["artId"];
             $statLog["conf"] = $this->art["conference"];
         } else {
             logit(REPORT, "Could not open article file {$file} (Refer: {$_SERVER["HTTP_REFERER"]})");
             $error = true;
         }
     }
     //get images
     if (is_numeric($this->artId)) {
         $sql = "SELECT artId FROM articleImages WHERE artId = {$this->artId} ";
         if ($rc = dbQuery($sql)) {
             if ($rowImg = dbFetch($rc)) {
                 $this->art["image"] = "/img_{$this->art["artId"]}.jpg";
             } else {
                 $this->art["image"] = "";
             }
         } else {
             logit(WARN, " DB Error:  {$sql} in " . __FILE__ . " on line: " . __LINE__);
         }
         //get Image, internal
         $sql = "SELECT artId FROM articleInternalImages WHERE artId = {$this->artId} ";
         if ($rc = dbQuery($sql)) {
             if ($rowImg = dbFetch($rc)) {
                 $this->art["imageInternal"] = "/imgNews_{$this->art["artId"]}.jpg";
             } else {
                 $this->art["imageInternal"] = $this->art["image"];
                 //if no internal use hp
             }
         } else {
             logit(WARN, " DB Error:  {$sql} in " . __FILE__ . " on line: " . __LINE__);
         }
     } else {
         $this->art["imageInternal"] = "";
         $this->art["image"] = "";
     }
     //get subtopic names
     /*
     		if (is_array($this->art["subtopics"]))
     			$sql="SELECT confId,confName FROM confNames WHERE confId IN (".implode(",",$this->art["subtopics"]).",{$this->art["conference"]}) ";
     		else $sql="SELECT confId,confName FROM confNames WHERE confId ='{$this->art["conference"]}' ";
     */
     //get all confs because the page now needs all of them
     $sql = "SELECT confId,confName FROM confNames";
     if ($rc = dbQuery($sql)) {
         while ($row = dbFetch($rc)) {
             $this->confNames[$row["confId"]] = $row["confName"];
         }
     } else {
         logit(WARN, " DB Error:  {$sql} in " . __FILE__ . " on line: " . __LINE__);
     }
     //dumpVar($this->art);
     if ($this->preview) {
         $this->art["headline"] .= " (preview)";
     }
 }
Exemplo n.º 21
0
    if (!array_key_exists($ext, $mimeTypes)) {
        $mime = 'application/octet-stream';
    } else {
        $mime = $mimeTypes[$ext];
    }
    return $mime;
}
$url = str_replace('/public', '', query_path());
$ext = getExt($url);
$mime = getMime($ext);
function getFile($url)
{
    $hostDir = BuCore::fstab('staticHostDir') . '/' . HTTP_HOST;
    $prjDir = BuCore::fstab('staticPrj');
    $coreDir = BuCore::fstab('staticCore');
    foreach (array($hostDir, $prjDir, $coreDir) as $v) {
        if (file_exists($v . $url)) {
            return $v . $url;
        }
    }
}
$file = getFile($url);
if ($file) {
    $fp = fopen($file, 'rb');
    header("Content-Type: " . $mime);
    header("Content-Length: " . filesize($file));
    fpassthru($fp);
} else {
    header("HTTP/1.0 404 Not Found");
    exit;
}
Exemplo n.º 22
0
function AddSMFPersonalBlock()
{
    global $boarddir, $context, $adkFolder;
    checkSession('get');
    //Set error if empty id
    if (empty($_REQUEST['id']) || empty($_REQUEST['name']) || empty($_REQUEST['real'])) {
        fatal_lang_error('adkfatal_smf_p_blocks_not', false);
    }
    $id = CleanAdkStrings($_REQUEST['id']);
    $name = cleanAdkStrings($_REQUEST['name']);
    $real = CleanAdkStrings($_REQUEST['real']);
    //Set the dir blocks
    $blocks_dir = $adkFolder['blocks'] . '/' . $real;
    //Get the file :D
    $block_portal = getFile('http://www.smfpersonal.net/Adk-downloads/' . $id);
    //die($block_portal);
    fopen($blocks_dir, 'a');
    //die();
    //Does not exists?
    if (empty($block_portal)) {
        fatal_lang_error('adkfatal_smf_p_blocks_not', false);
    }
    //Create a block
    file_put_contents($blocks_dir, $block_portal);
    //Expand variable to create a simple block
    $_POST += array('titulo' => $name, 'empty_title' => 0, 'empty_body' => 0, 'empty_collapse' => 0, 'img' => '');
    createBlock('include', $real);
    redirectexit('action=admin;area=blocks;sa=viewblocks;' . $context['session_var'] . '=' . $context['session_id']);
}
Exemplo n.º 23
0
 public function DefaultIns()
 {
     $this->data['ListaReportes'] = '<tr>';
     $this->data['ListaReportes'] .= "<td>Exitencias</td>";
     $this->data['ListaReportes'] .= "<td colspan='2'>Reporte que dice cuantos vehiculos se encuentran ya sea en Inspeccion para ser procesados o en algun servicio siendo reparados</td>";
     $this->data['ListaReportes'] .= "<td><a href='?ctrl=Reporte&Act=Ver&id=1'><i class='icon-view'></i></a>";
     $this->data['ListaReportes'] .= '</tr>';
     $this->data['ListaReportes'] .= '<tr>';
     $this->data['ListaReportes'] .= "<td>Movimientos de un vehiculos</td>";
     $this->data['ListaReportes'] .= "<td colspan='2'>Reporte que muestra los movimientos que tubo un vehiculo desdes su estancia en Dr.Car</td>";
     $this->data['ListaReportes'] .= "<td><a href='?ctrl=Reporte&Act=Ver&id=2'><i class='icon-view'></i></a>";
     $this->data['ListaReportes'] .= '</tr>';
     $this->data['ListaReportes'] .= '<tr>';
     $this->data['ListaReportes'] .= "<td>Total de vehiculos en salida, en proceso , o compluidos en un area</td>";
     $this->data['ListaReportes'] .= "<td colspan='2'>Reporte que muestra el total de vehiculos en el inventario ya se canceldos , en proceso , concluidos y o cancelados Dr.Car</td>";
     $this->data['ListaReportes'] .= "<td><a href='?ctrl=Reporte&Act=Ver&id=3'><i class='icon-view'></i></a>";
     $this->data['ListaReportes'] .= '</tr>';
     echo getFile('header', $this->dataHeader) . getFile('Reporte/defaultReporte', $this->data) . getFile('footer', $this->dataFooter);
 }
Exemplo n.º 24
0
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once 'WebDFS/Client.php';
require_once 'WebDFS/Helper.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    handleUpload();
} else {
    if (isset($_GET['delete'])) {
        deleteFile($_GET['delete']);
    } else {
        if (isset($_GET['get'])) {
            getFile($_GET['get']);
        } else {
            showForm();
        }
    }
}
function showForm()
{
    echo '
        <html>
        <body>
        <form action="/upload.php" enctype="multipart/form-data" method="post">
        <p>
        filename<br>
        <input type="text" name="name" size="30">
        </p>
Exemplo n.º 25
0
function getManifest($zip_file)
{
    ini_set("max_execution_time", "3600");
    return getFile($zip_file, "manifest.php");
}
Exemplo n.º 26
0
<?php

if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') {
    if (isset($_GET['check_award'])) {
        $awards = getFile();
        if ($awards['award_a'] <= 0 && $awards['award_b'] <= 0 && $awards['award_c'] <= 0) {
            echo '0';
        } else {
            echo '1';
        }
        exit;
    }
    $rs_slot_1 = $_POST['rs_slot_1'];
    $rs_slot_2 = $_POST['rs_slot_2'];
    $rs_slot_3 = $_POST['rs_slot_3'];
    $awards = getFile();
    //KIEM TRA CO GIA THUONG NAO DA HET HAY CON
    $awards_rand = $awards;
    foreach ($awards_rand as $key => $award) {
        if ($award <= 0) {
            unset($awards_rand[$key]);
        }
    }
    //LAY NGAY NHIEN TRONG NHUNG GIAI THUONG CON
    $aw = array_rand($awards_rand);
    //TRU GIAI THUONG DUOC CHON DI 1 GIAI THUONG
    if ($aw != "") {
        $awards[$aw]--;
    }
    //LUU LAI GAI THUONG VAO FILE
    saveToFile($awards);
Exemplo n.º 27
0
 $TRACKINGSCRIPT = str_replace("<!--is_ovlpos-->", parseBool($detector->BrowserName != "Internet Explorer" || $detector->BrowserVersion > 6), $TRACKINGSCRIPT);
 $TRACKINGSCRIPT = str_replace("<!--is_ovlc-->", parseBool(!empty($_GET["ovlc"])), $TRACKINGSCRIPT);
 if (!empty($_GET["ovlc"]) && strlen(base64UrlDecode($_GET["ovlc"])) == 7) {
     require LIVEZILLA_PATH . "_lib/functions.external.inc.php";
     $TRACKINGSCRIPT .= getFile(TEMPLATE_SCRIPT_OVERLAY_CHAT);
     $TRACKINGSCRIPT = str_replace("<!--def_trans_into-->", $CONFIG["gl_default_language"], $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--header_offline-->", base64_encode(getOParam("ovlto", $LZLANG["client_overlay_title_offline"], $c, FILTER_HTML_ENTITIES)), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--header_online-->", base64_encode(getOParam("ovlt", $LZLANG["client_overlay_title_online"], $c, FILTER_HTML_ENTITIES)), $TRACKINGSCRIPT);
     $color = getBrightness(base64UrlDecode($_GET["ovlc"])) > getBrightness(base64UrlDecode($_GET["ovlct"])) ? $_GET["ovlct"] : $_GET["ovlc"];
     $TRACKINGSCRIPT = str_replace("<!--color-->", hexDarker(str_replace("#", "", base64UrlDecode($color)), 50), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--tickets_external-->", parseBool($openTicketExternal), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--chats_external-->", parseBool($openChatExternal), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--offline_message_mode-->", $CONFIG["gl_om_mode"], $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--offline_message_http-->", $CONFIG["gl_om_http"], $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--post_html-->", base64_encode(str_replace("<!--color-->", "#000000", str_replace("<!--lang_client_edit-->", strtoupper($LZLANG["client_edit"]), getFile(TEMPLATE_HTML_MESSAGE_OVERLAY_CHAT_EXTERN)))), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--add_html-->", base64_encode(getFile(TEMPLATE_HTML_MESSAGE_OVERLAY_CHAT_ADD)), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--offline_message_pop-->", parseBool(!empty($CONFIG["gl_om_pop_up"])), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--ec_t-->", $eca = getOParam("eca", 0, $nu, FILTER_VALIDATE_INT), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--gtv2_api_key-->", strlen($CONFIG["gl_otrs"]) > 1 ? base64_encode($CONFIG["gl_otrs"]) : "", $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--shadow-->", parseBool(!empty($_GET["ovlsc"])), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--shadowx-->", getOParam("ovlsx", 0, $nu, FILTER_SANITIZE_NUMBER_INT), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--shadowy-->", getOParam("ovlsy", 0, $nu, FILTER_SANITIZE_NUMBER_INT), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--shadowb-->", getOParam("ovlsb", 0, $nu, FILTER_SANITIZE_NUMBER_INT), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--shadowc-->", getOParam("ovlsc", 0, $nu, FILTER_SANITIZE_SPECIAL_CHARS), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--hide_group_select_chat-->", parseBool(getOParam("hcgs", 0, $nu, FILTER_VALIDATE_INT) == "1"), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--hide_group_select_ticket-->", parseBool(getOParam("htgs", 0, $nu, FILTER_VALIDATE_INT) == "1"), $TRACKINGSCRIPT);
     $TRACKINGSCRIPT = str_replace("<!--require_group_selection-->", parseBool(getOParam("rgs", 0, $nu, FILTER_VALIDATE_INT) == "1"), $TRACKINGSCRIPT);
     if ($eca == 1) {
         $TRACKINGSCRIPT = str_replace("<!--ec_header_text-->", base64UrlEncode(getOParam("echt", "Have questions?", $c, FILTER_HTML_ENTITIES)), $TRACKINGSCRIPT);
         $TRACKINGSCRIPT = str_replace("<!--ec_header_sub_text-->", base64UrlEncode(getOParam("echst", "Chat with us live", $c, FILTER_HTML_ENTITIES)), $TRACKINGSCRIPT);
         $TRACKINGSCRIPT = str_replace("<!--ec_o_header_text-->", base64UrlEncode(getOParam("ecoht", "Have questions?", $c, FILTER_HTML_ENTITIES)), $TRACKINGSCRIPT);
Exemplo n.º 28
0
function getFilms(&$return, $paths = NULL)
{
    $error = "";
    $db = connectDB();
    if (!isset($paths)) {
        if (defined("PATHS")) {
            $paths = unserialize(PATHS);
        }
        return false;
    }
    foreach ($paths as $path) {
        $path = str_replace('\\', '/', $path . '/');
        //f*****g Windows
        $result = NULL;
        if (!listFile($result, $path)) {
            $error .= "Erreur sur l'ouverture du répértoire ('{$path}')\n";
            continue;
        }
        //récupération de l'id de la source ou son ajout si nécessaire
        if (($source_id = getSourceId($db, $path)) === false) {
            $source_id = insertSource($db, $path);
        }
        $return = array();
        foreach ($result as $row) {
            if (!getInfoOfFilm($row[RESULT_NAME], $title, $file_type)) {
                $error .= "Name is invalide " . $row[RESULT_NAME];
                continue;
            }
            //récupération de l'id du type de fichier
            if (($file_type_id = getTypeId($db, $file_type)) === false) {
                //PARANOIA use default type id : 1
                $file_type_id = 1;
            }
            $row[RESULT_PATH_CLEAR] = str_replace($path, "", $row[RESULT_PATH]);
            if (empty($row[RESULT_PATH_CLEAR])) {
                $row[RESULT_PATH_CLEAR] = ".";
            }
            //récupération de l'id de du fichier ou son ajout si nécessaire
            if (($file_id = getFile($db, $source_id, $row[RESULT_PATH_CLEAR], $row[RESULT_NAME], $file_type_id)) === false) {
                $file_id = insertFile($db, $source_id, $row[RESULT_PATH_CLEAR], $row[RESULT_NAME], $title, $file_type_id);
            }
            if ($title !== false) {
                // echo $error;
                $return[] = array($file_id, $title);
            } else {
                $error .= "Titre non trouvé pour le fichier ('{$row[RESULT_PATH]}{$row[RESULT_NAME]}')";
            }
        }
    }
    if (empty($return)) {
        return false;
    }
    return true;
}
		$pdf->Rect($pdf->GetX(), $pdf->GetY(), 194, 44, "DF");
	}


	if (($id == 328723) or ($id == 334890)) {		// Harcodeado por ticket 41756..
		$pdf->Rect(92, 110, 104, 8, "DF");	
		$pdf->Ln(-102);
		$pdf->SetFont("Arial", "", 8);
		$pdf->Cell(80);
		$pdf->Cell(0, 0, "Claúsula penal por incumplimientos de denuncias del empleador $2.000- (dos mil)", 0, 0);	
	}

	if ($row["ILTEMPLEADOR"] != "S")
		$pdf->Rect(12, 123, 104, 4, "DF");	

	$pdf->Output($file, "F");
	//	*******  FIN - Armado del reporte..  *******
}
catch (Exception $e) {
	DBRollback($conn);
	echo "<script type='text/javascript'>alert(unescape('".rawurlencode($e->getMessage())."'));</script>";
	exit;
}
?>
<iframe id="iframePdf" name="iframePdf" src="<?php 
echo getFile($file);
?>
" style="height:376px; width:752px;"></iframe>
<p style="margin-left:696px;">
	<input class="btnVolver" type="button" value="" onClick="history.back(-1);" />
</p>
Exemplo n.º 30
0
 case "DELETE":
     $files = deleteFile($fullPath, $rootDir, $args, $status);
     if ($files) {
         // Compile the final result
         $result = new stdClass();
         $result->total = count($files);
         $result->status = $status;
         $result->items = $files;
         header("Content-Type: text/json");
         print json_encode($result);
     } else {
         cgiResponse($status, "Not Found", null);
     }
     break;
 case "GET":
     $files = getFile($fullPath, $rootDir, $args, $status);
     $total = count($files);
     // Compile the final result
     $result = new stdClass();
     $result->total = $total;
     $result->status = $total ? HTTP_V_OK : HTTP_V_NO_CONTENT;
     $result->items = $files;
     header("Content-Type: text/json");
     print json_encode($result);
     break;
 case "POST":
     $files = renameFile($fullPath, $rootDir, $args, $status);
     // Compile the final result
     if ($status == HTTP_V_OK) {
         $result = new stdClass();
         $result->total = count($files);