示例#1
0
function appsHandler()
{
    $arr = getApps();
    for ($ctr = 0; $ctr < count($arr); $ctr++) {
        echo '<option value ="' . $arr[$ctr][0] . '">' . $arr[$ctr][1] . '</option>';
    }
}
示例#2
0
function createAppCollection($category)
{
    $arrApp;
    $ctr = 0;
    $item = "";
    $class = "col-lg-3 col-md-4 col-xs-6 thumb-2 appdiv";
    if (strtolower($category) == 'all') {
        $arrApp = getApps();
        $totalSet = count($arrApp);
    } else {
        $arrApp = getAppsByCategory($category);
        $totalSet = count($arrApp);
    }
    for ($y = 0; $y < $totalSet; $y++) {
        $id = $arrApp[$y][0];
        $name = $arrApp[$ctr][1];
        $cat = $arrApp[$ctr][2];
        $src = $arrApp[$ctr][3];
        $item = $item . "<div class='" . $class . "'" . "' id='" . $id . "'>" . "<img class='col-xs-offset-2 col-sm-offset-2 col-md-offset-2 col-lg-offset-2" . " col-xs-8 col-sm-8 col-md-8 col-lg-8 img-responsive thumbnail appimg'" . "src=" . $src . ">" . "<div class = 'text-center'>" . "<h4 class='col-xs-12 col-sm-12 col-md-12 col-lg-12 lg-title appCTitle'>" . $name . "</h4><p class = 'col-xs-12 col-sm-12 col-md-12 col-lg-12 lg-title appCDesc'>" . $cat . "</p></div>";
        $ctr++;
        $item = $item . "</div>";
    }
    echo $item;
}
示例#3
0
// make media access from http
$medialink = "";
$httpmedia = "/tmp/www/media";
if (is_link($httpmedia)) {
    $medialink = readlink($httpmedia);
}
if ("" == $medialink && is_link("/sbin/www/media")) {
    $medialink = readlink("/sbin/www/media");
}
if ("" == $medialink) {
    symlink($base, $httpmedia);
}
//--------------------------------------
//--------------------------------------
// main
printRSS(getApps($mounts));
//--------------------------------------
//--------------------------------------
// get applications
function getApps($mounts)
{
    global $defaultFocusedIcon, $defaultUnfocusedIcon, $base;
    $appfolders = array();
    foreach ($mounts as $mount) {
        $appdir = $mount . "scripts/";
        if (is_dir($appdir)) {
            $appfolders = rscandir($appdir);
        }
    }
    foreach ($appfolders as $appfolder) {
        $appconfig = $appfolder . "version.xml";
    <a href="../editLink/index.php">Edit Existing Link</a>
</div>

<div class='titleArea'>
    <form id='linkData' method="post">
        <table>
            <tr>
                <th> Link Name: </th><td>
                <input type="text" name="name" maxlength=200 size=40 value=""/>
                *This is the text that will appear on the menu bar </td>
            </tr>
            <tr>
                <th> App: </th><td>
                <select name="appId">
                	<?php 
    getApps();
    ?>
                </select>
                <?php 
    echo isSuperuser() ? "" : "*The path to the file with NO leading slash </td>";
    ?>
            </tr>
            <tr>
                <th> Area: </th><td> <?php 
    getArea();
    ?>
                </td>
            </tr>
            <tr>
                <th> Permission Needed: </th><td>
                <select name='permission'>
示例#5
0
<?php

require __DIR__ . '/../config.php';
require 'check.php';
require_once 'func.php';
$apps = getApps();
$php->tpl->assign("apps", $apps);
if (isset($_GET['debug'])) {
    Swoole\Error::sessd();
}
if (isset($_GET['page'])) {
    $php->tpl->display("admin_index_{$_GET['page']}.html");
} else {
    $php->tpl->display('admin_index.html');
}
	<form id='linkData' method="post">
		<table>
			<tr>
				<th> Link Name: </th><td>
				<input type="text" name="name" maxlength=200 size=40 value="<?php 
    echo $link['name'];
    ?>
"/>
				*This is the text that will appear on the menu bar </td>
			</tr>
			<?php 
    if (isSuperuser()) {
        $print = "<tr>";
        $print .= "<th> App: </th><td>";
        $print .= "<select name='appId'>";
        $print .= getApps($link['appId']);
        $print .= "</select>";
        $print .= "</td>";
        $print .= "</tr>";
        echo $print;
    }
    ?>
			<tr>
				<th> Area: </th><td>
				<select name='area'>
					<?php 
    getArea($link['area']);
    ?>
				</select></td>
			</tr>
			<tr>
                $name = $apps->plaintext;
                $names = explode(' ', $name);
                $realname = "";
                for ($i = 0; $i < count($names); $i++) {
                    if (strlen($realname) > 0) {
                        $realname = $realname . " ";
                    }
                    if (strcasecmp($names[$i], "&amp;") != 0) {
                        $realname = $realname . $names[$i];
                    } else {
                        $realname = $realname . "&";
                    }
                }
                print $realname . ": \n";
                $url = "http://civiccommons.org" . $apps->href;
                getApps($title, $realname, $url);
            }
        }
    }
}
print "done";
/*$result=scraperwiki::select('* from tagtable limit 1');
print_r ($result);*/
function getApps($title, $tag, $url)
{
    $html = scraperWiki::scrape($url);
    $dom = new simple_html_dom();
    $dom->load($html);
    foreach ($dom->find("span[@class='field-content'] a") as $data) {
        $name = $data->plaintext;
        $names = explode(' ', $name);