Example #1
0
function asset($partial_url)
{
    $url = concatPath(\Route::getBaseUrl(), $partial_url);
    return $url;
}
Example #2
0
File: Vue.php Project: fzed51/core
 public static function addFileScript($file_script, $first = false)
 {
     $key = md5($file_script);
     if (!isset(self::$_script_cache[$key])) {
         self::$_script_cache[$key] = true;
         $file_script = concatPath('./script', $file_script);
         if (file_exists(self::WEBPATH . DIRECTORY_SEPARATOR . $file_script)) {
             $root_file_script = concatPath(self::getBaseRoot(), $file_script);
             if ($first) {
                 self::$_script = '<script type="text/javascript" src="' . $root_file_script . '"></script>' . PHP_EOL . self::$_script;
             } else {
                 self::$_script .= '<script type="text/javascript" src="' . $root_file_script . '"></script>' . PHP_EOL;
             }
         }
     }
 }
Example #3
0
function getInstanceList($db, $user, $config, $where)
{
    $stmt = new db_stmt_select("instances");
    $stmt->addColumn("*");
    $stmt->setWhereClause($where);
    $stmt->setOrderBy("name");
    $s = $stmt->getStatement();
    $rs = $db->Execute($s);
    if (!$rs) {
        return "";
    }
    $rs->MoveFirst();
    $count = 0;
    $res2 = "";
    while (!$rs->EOF) {
        $count++;
        $core_url = concatPath($rs->fields["solr_php_ws_root"], "/core_" . $rs->fields["uuid"] . "/");
        //$url_search = "index.php?core=" . urlencode($core_url);
        //if ($search_php_config!="")
        //$url_search .= "&config=" . $search_php_config;
        //$key = base64_encode ($core_url . "|" . $config_file);
        $key = base64_encode($core_url);
        $res2 .= "<tr>";
        $res2 .= "<td>";
        $res2 .= "<a href='index.php?key=" . $key . "' title='Search'>";
        $res2 .= $rs->fields["name"];
        // . " (id=" . $rs->fields["id"] . ")";
        $res2 .= "</a>";
        $res2 .= "</td>";
        if ($user->getPlan() != "perso") {
            $res2 .= "<td width='20%'>";
            $res2 .= "<img src='images/" . getSolrTypeMnemo($rs->fields["type"]) . "_icone.png' class='img_icone'>&nbsp;";
            $res2 .= getSolrTypeLabel($rs->fields["type"]);
            $res2 .= "</td>";
        }
        $res2 .= "</tr>";
        $rs->MoveNext();
    }
    if ($count == 0) {
        $res = "<br /><div style='text-align: center;'>no instance yet !</div>";
    } else {
        $res = "<center>Choose an instance<br /><table border='0' cellspacing='0' cellpadding='0'>";
        if ($user->getPlan() != "perso") {
            $res .= "<tr><th>Name</th><th>Type</th></tr>";
        } else {
            $res .= "<tr><th>Name</th></tr>";
        }
        $res .= $res2;
        $res .= "</table></center>";
    }
    return $res;
}