コード例 #1
0
ファイル: cli.php プロジェクト: ClearcodeHQ/cc-skeletons
function check_parameter($argv_param)
{
    global $clear, $is_forced;
    switch ($argv_param) {
        case '-c':
        case '--clear':
            $clear = true;
            break;
        case '-f':
        case '--force':
            $is_forced = true;
            break;
        case '-cf':
        case '-fc':
            $is_forced = true;
            $clear = true;
            break;
        case '-h':
        case '--help':
            show_help();
            exit;
        default:
            echo 'Incorrect parameter name';
            exit;
    }
}
コード例 #2
0
/**
 * Get the bookmarks file as a string
 *
 * Uses the -f or --file parameter to open and read a
 * a bookmarks file
 *
 * @return string Contents of the file
 */
function getBookmarksFile()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        // TRANS: Exception thrown when a file upload cannot be found.
        // TRANS: %s is the file that could not be found.
        throw new Exception(sprintf(_m('No such file "%s".'), $filename));
    }
    if (!is_file($filename)) {
        // TRANS: Exception thrown when a file upload is incorrect.
        // TRANS: %s is the irregular file.
        throw new Exception(sprintf(_m('Not a regular file: "%s".'), $filename));
    }
    if (!is_readable($filename)) {
        // TRANS: Exception thrown when a file upload is not readable.
        // TRANS: %s is the file that could not be read.
        throw new Exception(sprintf(_m('File "%s" not readable.'), $filename));
    }
    // TRANS: %s is the filename that contains a backup for a user.
    printfv(_m('Getting backup from file "%s".') . "\n", $filename);
    $html = file_get_contents($filename);
    return $html;
}
コード例 #3
0
function show_options(array $commands = array())
{
    drush_print(t('Please type one of the following options to continue:'));
    show_help($commands);
    $handle = fopen("php://stdin", "r");
    $line = fgets($handle);
    run(trim($line), $commands);
}
コード例 #4
0
ファイル: common.php プロジェクト: AdmiralCurtiss/talestra
function perform($callback)
{
    global $list, $argv;
    $args = $argv;
    array_shift($args);
    $list = parse_list('images.lst');
    if (!$list) {
        die("Hubo un error\n");
    }
    function show_help()
    {
        global $list;
        echo "Ficheros:\n";
        echo implode(', ', array_keys($list));
        echo "\n";
        exit;
    }
    if (!sizeof($args)) {
        show_help();
    }
    $total = 0;
    $error = 0;
    foreach ($args as $ac) {
        if ($ac == '*') {
            $ac = array_keys($list);
        } else {
            $ac = array($ac);
        }
        foreach ($ac as $c) {
            $cc =& $list[$c];
            if (!isset($cc)) {
                echo "No existe '{$c}'\n";
                continue;
            }
            try {
                if (!$callback($c, $cc)) {
                    $error++;
                }
            } catch (Exception $e) {
                echo $e;
                $error++;
            }
            $total++;
        }
    }
    printf("----------------------\n");
    printf("Total procesados: %d\n", $total);
    printf("Total errores   : %d\n", $error);
}
コード例 #5
0
ファイル: bydate.php プロジェクト: digideskio/sacc1
function show_byday2($tmin, $tmax, $link)
{
    $result = mysql_query("select distinct u.login as uname, d.id as id, count(d.size) as _count, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<{$tmax} and utime>{$tmin} group by u_id order by _ssize desc;", $link);
    $mod_name = "day stat, daily leve2";
    show_head();
    show_help();
    //    echo "select distinct u.login as uname, sum(d.size) as _ssize from detail d, users u where d.u_id=u.id and utime<$tmax and utime>$tmin group by u_id;";
    echo "<br>" . strftime("%d %B, %T", (int) $tmin) . "-" . strftime("%d, %B %T", (int) $tmax) . " ";
    echo "<HR NOSHADE COLOR=#000000 SIZE=1>\n<BR>\n";
    echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n      <TR><TD BGCOLOR=#93BEE2>\n      <TABLE BORDER=0 CELLPADDING=1 CELLSPACING=1>\n         <TR VALIGN=TOP ALIGN=CENTER>\n            <TD HEIGHT=15>login</TD>\n            <TD><B>count</B></TD>\n            <TD><B>bytes</B></TD>\n            </TR>";
    $max = mysql_num_rows($result);
    for ($i = 0; $i < $max; $i++) {
        $login = @mysql_result($result, $i, "uname");
        $uid = @mysql_result($result, $i, "id");
        $size = @mysql_result($result, $i, "_ssize");
        $count = @mysql_result($result, $i, "_count");
        echo "<TR BGCOLOR=#FFF7E5 ALIGN=RIGHT>\n\t<td>{$login}</td>\n\t<td>" . dotize($count) . "</a></td>\n\t<td>" . dotize($size) . "</a></td>\n\t</tr>";
    }
}
コード例 #6
0
/**
 * Get the bookmarks file as a string
 * 
 * Uses the -f or --file parameter to open and read a
 * a bookmarks file
 *
 * @return string Contents of the file
 */
function getBookmarksFile()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    // TRANS: %s is the filename that contains a backup for a user.
    printfv(_("Getting backup from file '%s'.") . "\n", $filename);
    $html = file_get_contents($filename);
    return $html;
}
コード例 #7
0
function getActivityStreamDocument()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    // TRANS: Commandline script output. %s is the filename that contains a backup for a user.
    printfv(_("Getting backup from file '%s'.") . "\n", $filename);
    $xml = file_get_contents($filename);
    return $xml;
}
コード例 #8
0
function getAtomFeedDocument()
{
    $filename = get_option_value('f', 'file');
    if (empty($filename)) {
        show_help();
        exit(1);
    }
    if (!file_exists($filename)) {
        throw new Exception("No such file '{$filename}'.");
    }
    if (!is_file($filename)) {
        throw new Exception("Not a regular file: '{$filename}'.");
    }
    if (!is_readable($filename)) {
        throw new Exception("File '{$filename}' not readable.");
    }
    $xml = file_get_contents($filename);
    $dom = DOMDocument::loadXML($xml);
    if ($dom->documentElement->namespaceURI != Activity::ATOM || $dom->documentElement->localName != 'feed') {
        throw new Exception("'{$filename}' is not an Atom feed.");
    }
    return $dom;
}
コード例 #9
0
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('list_payment_methods');
// #### PAYMENT METHOD SECTION
echo $PAYMENT_METHOD;
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
コード例 #10
0
function snmp_walk($snmp_host, $snmp_community, $snmp_oid, $snmp_version)
{
    if (extension_loaded("snmp")) {
        if ($snmp_version == "1") {
            if ($snmp_return = @snmpwalk($snmp_host, $snmp_community, $snmp_oid)) {
                return $snmp_return;
            } else {
                show_help("SNMP");
            }
        } else {
            if ($snmp_version == "2c" || $snmp_version == "2") {
                if ($snmp_return = @snmp2_walk($snmp_host, $snmp_community, $snmp_oid)) {
                    return $snmp_return;
                } else {
                    show_help("SNMP");
                }
            } else {
                show_help("SNMP");
            }
        }
    } else {
        show_help("SNMP_MODULE");
    }
}
コード例 #11
0
Attempts a User Stream connection to Twitter as the given user, dumping
data as it comes.

ENDOFHELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
if (have_option('n')) {
    $nickname = get_option_value('n');
} else {
    if (have_option('nick')) {
        $nickname = get_option_value('nickname');
    } else {
        if (have_option('all')) {
            $nickname = null;
        } else {
            show_help($helptext);
            exit(0);
        }
    }
}
/**
 *
 * @param User $user 
 * @return TwitterOAuthClient
 */
function twitterAuthForUser(User $user)
{
    $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
    $token = TwitterOAuthClient::unpackToken($flink->credentials);
    if (!$token) {
        throw new ServerException("No Twitter OAuth credentials for this user.");
コード例 #12
0
$HD_Form->init();
if (cardid != '' || !is_null($cardid)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$cardid}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help("money_situation");
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
?>
<br>
<script language="javascript">
function go(URL)
{
	if ( Check() )
	{
		
コード例 #13
0
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include "PP_header.php";
// #### HELP SECTION
show_help('view_payment');
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include "PP_footer.php";
コード例 #14
0
ファイル: header.php プロジェクト: lidl/framework
</td>
		<td>
			<input id="machine_id" type="text" required size="40" name="machine_id" saved-value="<?php 
echo $machine_id;
?>
" value="<?php 
echo $machine_id;
?>
"/>
		</td>
	</tr>
</table>
</form>
</div>
<h2><?php 
echo _("Module Administration");
?>
</h2>
<div id="shield_link_div">
	<a href="#" id="show_auto_update" title="<?php 
echo _("Click to configure Update Notifications");
?>
"><span id="shield_link" class="<?php 
echo $shield_class;
?>
"></span></a>
</div>
<?php 
if ($edgemode) {
    echo show_help(sprintf(_("This system has edge mode enabled. This means you will get modules as they are released and may encounter bugs not seen in general availibility modules.</br> For more information visit %s"), '<a href="http://wiki.freepbx.org/x/boi3Aw">http://wiki.freepbx.org/x/boi3Aw</a>'), _("EDGE MODE"));
}
コード例 #15
0
     $playback_file = $command_split[1];
     if (!$playback_file || !file_exists("/etc/phpshellsessions/{$playback_file}")) {
         $command = "";
         echo "Could not locate playback file.\n";
     } else {
         $command = "";
         echo "\nPlayback of file {$command_split[1]} started.\n\n";
         playback_file("{$playback_file}");
         continue;
     }
 }
 if ($first_command == "exit" or $first_command == "quit") {
     die;
 }
 if ($first_command == "help" or $first_command == "?") {
     show_help();
     $playbackbuffer = "";
     continue;
 }
 if ($first_command == "exec" or $first_command == "exec;") {
     playback_text($playbackbuffer);
     $playbackbuffer = "";
     continue;
 }
 if ($first_command == "stoprecording" || $first_command == "stoprecord" || $first_command == "stop") {
     if ($recording) {
         fwrite($recording_fd, $playbackbuffer);
         fclose($recording_fd);
         $command = "";
         conf_mount_ro();
         echo "Recording stopped.\n";
コード例 #16
0
$enginename = false;
$enginepath = false;
// Handle adding/updating an engine
if ($_REQUEST['delete']) {
    ttsengines_delete_engine($_REQUEST['engineid']);
} else {
    if ($_POST['edit']) {
        ttsengines_update_engine($_POST['engineid'], $_POST['enginename'], $_POST['enginepath']);
    } else {
        if ($_POST['addengine']) {
            ttsengines_add_engine($_POST['enginename'], $_POST['enginepath']);
        }
    }
}
$engines = ttsengines_get_all_engines();
$info = show_help(_('On this page you can manage text to speech engines on your system. When you add an engine you give it a name, and the full path to the engine on your system. After doing this the engine will be available on the text to speech page.'));
$heading = _('Text to Speech Engines');
$delurl = '';
if (isset($edit)) {
    $data = \FreePBX::Ttsengines()->getEngine($edit);
    $enginename = isset($data['name']) ? $data['name'] : '';
    $enginepath = isset($data['path']) ? $data['path'] : '';
    $delurl = '?display=ttsengines&delete=true&engineid=' . $edit . '&edit=' . $edit;
}
?>
<div class="container-fluid">
	<h1><?php 
echo $heading;
?>
</h1>
		<?php 
コード例 #17
0
ファイル: general.php プロジェクト: lidl/core
<?php

$helptext = _("DAHDI Channel DIDs allow you to assign a DID to specific DAHDI Channels. You can supply the same DID to multiple channels. This would be a common scenario if you have multiple POTS lines that are on a hunt group from your provider. You MUST assign the channel's context to from-analog for these settings to have effect. It will be a line that looks like:<br /><br />context = from-analog<br /><br />in your chan_dahdi.conf configuration effecting the specified channel(s). Once you have assigned DIDs you can use standard Inbound Routes with the specified DIDs to route your calls.");
?>
<div class="container-fluid">
	<h1><?php 
echo _('DAHDI Channel DIDs');
?>
</h1>
	<?php 
echo show_help($helptext, 'Page Help', true);
?>
	<div class = "display full-border">
		<div class="row">
			<div class="col-sm-12">
				<div class="fpbx-container">
					<div class="display full-border">
						<?php 
echo load_view(__DIR__ . '/changrid.php', array());
?>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
コード例 #18
0
ファイル: admin.php プロジェクト: minhkiller/microweber
                    <?php 
_e("Language");
?>
                    </a></li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="mw_edit_page_right" style="padding: 20px;">
 
  
  
    <div id="settings_admin_<?php 
print $rand;
?>
" >
      <?php 
/*
 <module type="settings/system_settings" option_group="website" is_system="1" id="options_list_<?php print $rand; ?>">
*/
?>
    </div>
  </div>
</div>
<?php 
show_help('settings');
コード例 #19
0
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help('transaction');
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
コード例 #20
0
ファイル: index.php プロジェクト: Parashutik/ReloadCMS
            $frm = new InputForm('', 'post', __('Submit'));
            $frm->hidden('save', '1');
            $frm->addrow('', $frm->textarea('help_edit', $result, 55, 15) . tinymce_selector('help_edit'), 'top');
            $result = $frm->show(true);
            show_window(__('Help') . ' ' . __('for the module') . ' ' . get('edit') . ': ' . __('Edit'), $result, 'center');
        } else {
            $files = rcms_scandir($help_dir);
            if (!empty($files)) {
                $result = '<table width="100%">';
                foreach ($files as $helpfile) {
                    $admin_link = '
	<a href="?module=help&edit=' . $helpfile . '"><img title="' . __('Edit') . '" src="' . IMAGES_PATH . 'skins/edit_small.gif"></a>
	<a href="#" onClick="if(confirm(\'' . __('Delete') . ': \\n' . str_replace('"', '&#8243;', $helpfile) . '?\\n\')) document.location.href = \'?module=help&delete=' . $helpfile . '\'">
	<img title="' . __('Delete') . '" src="' . IMAGES_PATH . 'skins/trash_small.gif">
	</a>
	';
                    $result .= '<tr><td class="row2" align="left" valign="top">' . $helpfile . '</td><td class="row3" align="left" valign="top">' . $admin_link . '</td></tr>';
                }
                $result .= '</table>';
                show_window(__('Help') . ': ' . __('Manage files'), $result, 'center');
            } else {
                show_window(__('Help'), __('Nothing founded'));
            }
        }
    } else {
        show_window(__('Error'), __('You are not administrator of this site'));
    }
} elseif ($system->checkForRight('-any-')) {
    $link = $system->checkForRight('HELP') ? '<a href="?module=help"><img src="' . IMAGES_PATH . 'skins/view_file.png" title="' . __('Manage files') . '" alt="' . __('Manage files') . '" /></a>' : '';
    show_window(__('Help'), show_help() . $link);
}
コード例 #21
0
<div class="section" data-id="sscodecs">
	<!--Codecs-->
	<div class="element-container">
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="form-group">
						<div class="col-md-3">
							<label class="control-label" for="codecw"><?php 
echo _("Codecs");
?>
</label>
						</div>
						<div class="col-md-9">
							<?php 
echo \show_help(_("This is the default Codec setting for new Trunks and Extensions."));
?>
							<?php 
$seq = 1;
echo '<ul class="sortable">';
foreach (FreePBX::Sipsettings()->getCodecs('audio', true) as $codec => $codec_state) {
    $codec_trans = _($codec);
    $codec_checked = $codec_state ? 'checked' : '';
    echo '<li><a href="#">' . '<img src="assets/sipsettings/images/arrow_up_down.png" height="16" width="16" border="0" alt="move" style="float:none; margin-left:-6px; margin-bottom:-3px;cursor:move" /> ' . '<input type="checkbox" ' . ($codec_checked ? 'value="' . $seq++ . '" ' : '') . 'name="voicecodecs[' . $codec . ']" ' . 'id="' . $codec . '" ' . 'class="audio-codecs" ' . $codec_checked . ' />' . '<label for="' . $codec . '"> ' . '<small>' . $codec_trans . '</small>' . " </label></a></li>\n";
}
echo '</ul>';
?>
						</div>
					</div>
				</div>
			</div>
コード例 #22
0
ファイル: A2B_entity_did.php プロジェクト: sayemk/a2billing
         $HD_Form->FG_EDITION_CLAUSE = " id = " . $id;
     } else {
         $HD_Form->FG_EDITION_CLAUSE = $HD_Form->FG_TABLE_CLAUSE . " AND t1.id = " . $id;
     }
 }
 // TODO integrate in Framework
 if ($form_action == "delete") {
     $HD_Form->FG_TABLE_NAME = "cc_did_destination";
     $HD_Form->FG_EDITION_CLAUSE = "id_cc_card='" . $_SESSION["card_id"] . "' AND id = " . $id;
 }
 $list = $HD_Form->perform_action($form_action);
 // #### HEADER SECTION
 include "PP_header.php";
 // #### HELP SECTION
 if ($form_action == 'list') {
     show_help(list_did);
 }
 // #### TOP SECTION PAGE
 $HD_Form->create_toppage($form_action);
 ///////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////
 $instance_table = new Table($HD_Form->FG_TABLE_NAME, $HD_Form->FG_COL_QUERY);
 $instance_table_phonenumberdid = new Table($HD_Form->FG_TABLE_NAME, $HD_Form->FG_COL_QUERY);
 $list_phonenumberdid = $instance_table_phonenumberdid->Get_list($HD_Form->DBHandle, $HD_Form->FG_TABLE_CLAUSE, $order, $sens, null, null, $limite, $current_record);
 $nb_record = count($list_phonenumberdid);
 $nb_record = $instance_table->Table_count($HD_Form->DBHandle, $HD_Form->FG_TABLE_CLAUSE);
 if ($FG_DEBUG >= 1) {
     var_dump($list);
 }
 if ($nb_record <= $FG_LIMITE_DISPLAY) {
     $nb_record_max = 1;
コード例 #23
0
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != '' || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help('money_situation');
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
include 'PP_footer.php';
コード例 #24
0
ファイル: index.php プロジェクト: Tom-Byrne/gocdb
function Draw_Page($Page_Type)
{
    // Read only pages - these pages don't strictly require user authentication.
    // Therefore, to enable permit-all page viewing, comment out the call
    // to rejectIfNotAuthenticated() in the relevant case block. Note, some of
    // these pages will replace sensitive info such as telephone/email with
    // the string 'PROTECTED'
    // ************************************************************************
    switch ($Page_Type) {
        case "default":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
        case "View_Service_Endpoint":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service_endpoint.php';
            view_endpoint();
            break;
        case "Service_Groups":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_all.php';
            showAllServiceGroups();
            break;
        case "Service_Group":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup.php';
            showServiceGroup();
            break;
        case "Site":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_site.php';
            view_site();
            break;
        case "NGI":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngi.php';
            view_ngi();
            break;
        case "Service":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service.php';
            view_se();
            break;
        case "Services":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_all.php';
            drawSEs();
            break;
        case "NGIs":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngis.php';
            view_ngis();
            break;
        case "Sites":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_all.php';
            showAllSites();
            break;
        case "Projects":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_all.php';
            show_all_projects();
            break;
        case "Project":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_project.php';
            show_project();
            break;
        case "Scope_Help":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/scope_help.php';
            show_help();
            break;
        case "Site_Geo_xml":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/sitesForGoogleMapXML.php';
            show_xml();
            break;
        case "Error_Redirect":
            //rejectIfNotAuthenticated();
            show_view('error.php', $_REQUEST['error']);
            break;
        case "Static_HTML":
            //rejectIfNotAuthenticated();
            Draw_Static_HTML();
            break;
        case "Search":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/search.php';
            search();
            break;
            // CrUD Pages - These pages MUST have authentication enabled so
            // the calls to rejectIfNotAuthenticated() must be used.
            // *********************************************************************
        // CrUD Pages - These pages MUST have authentication enabled so
        // the calls to rejectIfNotAuthenticated() must be used.
        // *********************************************************************
        case "Revoke_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/revoke_request.php';
            view_revoke_request();
            break;
        case "Accept_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/accept_request.php';
            view_accept_request();
            break;
        case "Deny_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/deny_request.php';
            view_deny_request();
            break;
        case "Role_Requests":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/view_requests.php';
            view_requests();
            break;
        case "Request_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/request_role.php';
            request_role();
            break;
        case "Edit_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site.php';
            edit_site();
            break;
        case "Edit_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service.php';
            edit_service();
            break;
        case "SE_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/se_downtimes.php';
            se_downtimes();
            break;
        case "Add_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service.php';
            add_service();
            break;
        case "Add_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_endpoint.php';
            add_service_endpoint();
            break;
        case "Delete_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service.php';
            delete();
            break;
        case "Edit_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/edit_user.php';
            edit_user();
            break;
        case "User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/view_user.php';
            view_user();
            break;
        case "Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_downtime.php';
            view();
            break;
        case "My_Sites":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/my_sites.php';
            my_sites();
            break;
        case "Edit_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/edit_ngi.php';
            edit_ngi();
            break;
        case "Edit_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group.php';
            edit_service_group();
            break;
        case "Add_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_ses.php';
            add_ses();
            break;
        case "Search_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/search_ses.php';
            search_ses();
            break;
        case "Remove_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/remove_ses.php';
            remove_ses();
            break;
        case "Add_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site.php';
            add_site();
            break;
        case "SGroup_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup_downtimes.php';
            view_sgroup_downtimes();
            break;
        case "Add_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group.php';
            add_service_group();
            break;
        case "Site_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/site_downtimes.php';
            site_downtimes();
            break;
        case "Register":
            rejectIfNotAuthenticated('Access denied - ' . 'you need to be pre-authenticated before you can register a new account');
            require_once __DIR__ . '/controllers/user/register.php';
            register();
            break;
        case "Add_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/add_downtime.php';
            //require_once __DIR__.'/controllers/downtime/add_downtime_old.php';
            add();
            break;
        case "Edit_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/edit_downtime.php';
            //require_once __DIR__.'/controllers/downtime/edit_downtime_old.php';
            edit();
            break;
        case "End_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/end_downtime.php';
            endDt();
            break;
        case "Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            getServiceandEndpointList();
            break;
        case "Edit_Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            editDowntimePopulateEndpointTree();
            break;
        case "Downtime_View_Services":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_services.php';
            getSitesServices();
            break;
        case "Delete_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site.php';
            delete();
            break;
        case "Delete_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/delete_downtime.php';
            delete();
            break;
        case "Downtimes_Overview":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/downtimes_overview.php';
            view();
            break;
        case "Delete_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group.php';
            delete();
            break;
        case "Delete_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/delete_user.php';
            delete();
            break;
        case "Edit_Certification_Status":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_cert_status.php';
            edit();
            break;
        case "Retrieve_Account":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account.php';
            retrieve();
            break;
        case "Remove_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/remove_ngis.php';
            remove_ngis_project();
            break;
        case "Add_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/add_ngis.php';
            add_ngis_to_project();
            break;
        case "Edit_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/edit_project.php';
            edit_project();
            break;
        case "Delete_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/delete_project.php';
            delete_project();
            break;
        case "Admin_Move_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_site.php';
            move_site();
            break;
        case "Admin_Move_SEP":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_service_end_point.php';
            move_service_end_point();
            break;
        case "Admin_Service_Types":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_types.php';
            show_all();
            break;
        case "Admin_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_type.php';
            view_service_type();
            break;
        case "Admin_Edit_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_service_type.php';
            edit_type();
            break;
        case "Admin_Add_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_service_type.php';
            add_type();
            break;
        case "Admin_Delete_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type.php';
            delete_service_type();
            break;
        case "Admin_Delete_Service_Type_Denied":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type_denied.php';
            deny_delete_type();
            break;
        case "Admin_Add_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_ngi.php';
            add_ngi();
            break;
        case "Admin_Users":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/users.php';
            show_users();
            break;
        case "Admin_Edit_User_DN":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_user_dn.php';
            edit_dn();
            break;
            //        case "Admin_Change_User_Admin_Status":
            //            rejectIfNotAuthenticated();
            //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
            //            make_admin();
            //            break;
        //        case "Admin_Change_User_Admin_Status":
        //            rejectIfNotAuthenticated();
        //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
        //            make_admin();
        //            break;
        case "Admin_Add_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_project.php';
            add_project();
            break;
        case "Admin_Scopes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scopes.php';
            show_scopes();
            break;
        case "Admin_Remove_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_scope.php';
            remove_scope();
            break;
        case "Admin_Add_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_scope.php';
            add_scope();
            break;
        case "Admin_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scope.php';
            view_scope();
            break;
        case "Admin_Edit_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_scope.php';
            edit_scope();
            break;
        case "Admin_Delete_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_ngi.php';
            delete_ngi();
            break;
        case "User_Validate_DN_Change":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account_user_validate.php';
            validate_dn_change();
            break;
        case "Add_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site_property.php';
            add_site_property();
            break;
        case "Add_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_property.php';
            add_service_property();
            break;
        case "Add_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_endpoint_property.php';
            add_endpoint_property();
            break;
        case "Delete_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site_property.php';
            delete();
            break;
        case "Delete_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_property.php';
            delete();
            break;
        case "Delete_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_endpoint_property.php';
            delete();
            break;
        case "Edit_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site_property.php';
            edit_property();
            break;
        case "Edit_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_property.php';
            edit_property();
            break;
        case "Edit_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_endpoint_property.php';
            edit_property();
            break;
        case "Add_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group_property.php';
            add_service_group_property();
            break;
        case "Edit_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group_property.php';
            edit_property();
            break;
        case "Delete_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group_property.php';
            delete();
            break;
        case "Delete_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_endpoint.php';
            delete_endpoint();
            break;
        case "Edit_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_endpoint.php';
            edit_endpoint();
            break;
        default:
            // require auth by default
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
    }
}
コード例 #25
0
    $extendedhelp .= parking_overview_display();
}
$extendedhelp .= show_help('
            <table class="table table-stripped">
                <tr>
                    <td>*270:</td>
                    <td>' . _("Attended Transfer call to the Parking Lot Extension. The lot number will be announced to the parker") . '</td>
                </tr>
                <tr>
                    <td>*275:</td>
                    <td>' . sprintf(_("Attended transfer to lot %d"), 75) . '</td>
                </tr>
                <tr>
                    <td>*2' . _("nn") . ':</td>
                    <td>' . _("Attended Transfer call into Park lot nn") . '</td>
                </tr>
                <tr>
                    <td>70:</td>
                    <td>' . _("Park Yourself. The lot number will be announced to you") . '</td>
                </tr>
                <tr>
                    <td>75:</td>
                    <td>' . sprintf(_("Park Yourself into lot %d"), 75) . '</td>
                </tr>
                <tr>
                    <td>' . _("nn") . ':</td>
                    <td>' . _("Park Yourself into lot nn") . '</td>
                </tr>
            </table>
            ', _("Example Usage"));
?>
<ul class="nav nav-tabs">
コード例 #26
0
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help("list_log");
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
?>

<FORM METHOD=POST name="myForm" ACTION="<?php 
echo $PHP_SELF;
?>
?s=1&t=0&order=<?php 
echo $order;
?>
コード例 #27
0
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
if ($form_action == 'list') {
    show_help('list_cidgroup');
} else {
    show_help('edit_cidgroup');
}
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
コード例 #28
0
ファイル: installmodx.php プロジェクト: Vitaliz/modx_utils
/**
 * Get and vet command line arguments
 * @return array
 */
function get_args()
{
    $shortopts = '';
    $shortopts .= 'c::';
    // Optional value
    $shortopts .= 'z::';
    // Optional value
    $shortopts .= 't::';
    // Optional value
    $shortopts .= 'v::';
    // Optional value
    $shortopts .= 'i::';
    // Optional value
    $shortopts .= 'p::';
    // Optional value
    $shortopts .= 'h';
    // Optional value
    $longopts = array('config::', 'zip::', 'target::', 'version::', 'installmode::', 'core_path::', 'help');
    $opts = getopt($shortopts, $longopts);
    if (isset($opts['help'])) {
        show_help();
        teardown();
    }
    if (isset($opts['config'])) {
        if (!file_exists($opts['config'])) {
            abort('XML configuration file not found. ' . $opts['config']);
        }
    } else {
        $opts['config'] = false;
    }
    if (isset($opts['zip']) && !file_exists($opts['zip'])) {
        abort('Zip file not found. ' . $opts['zip']);
    }
    if (!isset($opts['target'])) {
        $opts['target'] = null;
    }
    if (!isset($opts['version'])) {
        $opts['version'] = 'latest';
    }
    if (!isset($opts['installmode'])) {
        $opts['installmode'] = '';
    } elseif (!in_array($opts['installmode'], array('new', 'upgrade'))) {
        show_help();
        abort('Invalid argument for --installmode. It supports "new" or "upgrade"');
    } elseif ($opts['installmode'] == 'upgrade') {
        if (!isset($opts['core_path'])) {
            abort('--core_path must be set for upgrades: we need it to locate your existing installation.');
        }
        // Careful: realpath may return false
        $opts['core_path'] = realpath($opts['core_path']) . DIRECTORY_SEPARATOR;
        if (!file_exists($opts['core_path'] . 'config/config.inc.php')) {
            abort('Invalid --core_path. Could not locate ' . $opts['core_path'] . 'config/config.inc.php');
        }
    }
    if (!isset($opts['core_path'])) {
        $opts['core_path'] = '';
    }
    return $opts;
}
コード例 #29
0
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help('callback');
?>


<script language="JavaScript" src="./javascript/calendar2.js"></script>
<?php 
// #### TOP SECTION PAGE
$HD_Form->create_toppage($form_action);
// #### CREATE FORM OR LIST
//$HD_Form -> CV_TOPVIEWER = "menu";
if (strlen($_GET["menu"]) > 0) {
    $_SESSION["menu"] = $_GET["menu"];
}
$HD_Form->create_form($form_action, $list, $id = null);
// #### FOOTER SECTION
include 'PP_footer.php';
コード例 #30
0
ファイル: skin.general.php プロジェクト: Parashutik/ReloadCMS
echo RCMS_ROOT_PATH;
?>
tools/js/tiny_mce/tiny_mce.js"></script>
    <script>
    $(function() {
	var url=document.location.href;
	$.each($("#layout-left a"),function(){
	if(this.href==url){$(this).addClass('active');};
	});
    });
    </script>
</head>
<body>
    <div id="layout-center">
	<?php 
echo '<div style="z-index:1;position:absolute;right:5px;">' . show_help(get('id')) . '</div>';
if (!empty($_GET['show'])) {
    $module = !empty($_GET['id']) ? basename($_GET['id']) : '.index';
    $module = explode('.', $module, 2);
    if (!is_file(ADMIN_PATH . 'modules/' . $module[0] . '/' . $module[1] . '.php')) {
        $message = __('Module not found') . ': ' . $module[0] . '/' . $module[1];
        include ADMIN_PATH . 'error.php';
    } elseif ($module[1] != 'index' && empty($MODULES[$module[0]][1][$module[1]])) {
        $message = __('Access denied') . ': ' . $module[0] . '/' . $module[1];
        include ADMIN_PATH . 'error.php';
    } else {
        include ADMIN_PATH . 'modules/' . $module[0] . '/' . $module[1] . '.php';
    }
} else {
    include ADMIN_PATH . 'modules/index.php';
}