Beispiel #1
0
function redirect($url, $hiddenUrl)
{
    header("Location: {$url}");
    html_header();
    echo 'This page has moved to <a href="' . $hiddenUrl . '">HERE :)</a>';
    exit;
}
 function printoutPreview () {
     echo html_header($this->config);
             
     echo $this->toStringPreview();
     
     echo html_footer();
 }
Beispiel #3
0
function html_header_demo($title = null, $included_files = null, $path = null, $no_cache = true)
{
    $hash = array('Home' => fbWeb::getWebRoot(), 'Demos' => fbWeb::getWebRoot() . '/demo');
    if ($title) {
        $hash[$title] = '';
    }
    return html_header($hash, $included_files, $path, $no_cache);
}
 function printoutPreview ($args) {
     
     if ($this->config->getValue("Main", "wholesite"))
         echo html_header($this->config);
     
     require_once($GLOBALS["RELATIVE_PATH_EXTERN"]
             . "/modules/views/ExternSemLectureTree.class.php");
     
     $tree = new ExternSemLectureTree($this->config, $args["start_item_id"]);
     $tree->showSemTree();
     
     if ($this->config->getValue("Main", "wholesite"))
         echo html_footer();
 }
function cookie_check()
{
    global $cfg;
    if (!isset($_SESSION['cookie_check'])) {
        if (isset($_GET['cookie_check'])) {
            html_header("Cookie Support Required");
            echo "<p>Cookies are not supported by your browser. " . "Please enable cookies and <a href=\"" . selflink() . "\">try again</a>.</p>";
            html_footer();
            exit;
        } else {
            $_SESSION['cookie_check'] = 1;
            redirect(selflink('cookie_check=1'));
        }
    }
}
Beispiel #6
0
function account_header($title)
{
    global $PHP_SELF, $LOGIN_USER, $LOGIN_LEVEL;
    html_header("{$title}");
    html_start_links(1);
    html_link("{$LOGIN_USER}", "{$PHP_SELF}");
    html_link("Change Password", "{$PHP_SELF}?P");
    if ($LOGIN_LEVEL == AUTH_ADMIN) {
        html_link("Manage Accounts", "{$PHP_SELF}?A");
    }
    if ($LOGIN_LEVEL > AUTH_USER) {
        html_link("New/Pending", "{$PHP_SELF}?L");
    }
    html_link("Logout", "{$PHP_SELF}?X");
    html_end_links();
}
function makeHtaccess()
{
    global $scriptPath, $baseURL;
    if (is_file($scriptPath . ".htaccess")) {
        return;
    }
    $htaccess = <<<EOF
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule ^bbclone/.*\$ - [PT]
RewriteRule ^([^_]+)_player/(.*)\$ index.php?command=\$1_player&dir=\$2 [NC,L]
RewriteRule ^rss/(.*)\$ index.php?command=rss&dir=\$1 [NC,L]
RewriteRule ^slide/(.*)\$ index.php?command=slide&dir=\$1 [NC,L]
RewriteRule ^thumbs/(.*)\$ index.php?command=thumbs&dir=\$1 [NC,L]
RewriteRule ^captions/(.*)\$ index.php?command=captions&dir=\$1 [NC,L]
RewriteRule ^(.*)/\$ index.php?command=gallery&dir=\$1
RewriteRule ^\$ index.php?command=gallery&dir= 
EOF;
    if (!is_writable($scriptPath)) {
        $who = exec('whoami');
        html_header("Permissions Error");
        echo "{$scriptPath} is not writable by {$who}. Can not create required .htaccess file.";
        html_footer();
        exit;
    }
    @file_put_contents($scriptPath . ".htaccess", $htaccess);
    header("Location: {$baseURL}");
    exit("Unknown Error. Please press refresh.");
}
Beispiel #8
0
function host_edit() {
	global $colors, $fields_host_edit, $reindex_types;

	display_output_messages();

	if (!empty($_GET["id"])) {
		$host = db_fetch_row("select * from host where id=" . $_GET["id"]);
		$header_label = "[edit: " . $host["description"] . "]";
	}else{
		$header_label = "[new]";
	}

	if (!empty($host["id"])) {
		?>
		<table width="98%" align="center">
			<tr>
				<td class="textInfo" colspan="2">
					<?php print $host["description"];?> (<?php print $host["hostname"];?>)
				</td>
			</tr>
			<tr>
				<td class="textHeader">
					SNMP Information<br>

					<span style="font-size: 10px; font-weight: normal; font-family: monospace;">
					<?php
					if (($host["snmp_community"] == "") && ($host["snmp_username"] == "")) {
						print "<span style='color: #ab3f1e; font-weight: bold;'>SNMP not in use</span>\n";
					}else{
						$snmp_system = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.1.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);

						if ($snmp_system == "") {
							print "<span style='color: #ff0000; font-weight: bold;'>SNMP error</span>\n";
						}else{
							$snmp_uptime = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.3.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);
							$snmp_hostname = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.5.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);

							print "<strong>System:</strong> $snmp_system<br>\n";
							print "<strong>Uptime:</strong> $snmp_uptime<br>\n";
							print "<strong>Hostname:</strong> $snmp_hostname<br>\n";
						}
					}
					?>
					</span>
				</td>
				<td class="textInfo" valign="top">
					<span style="color: #c16921;">*</span><a href="graphs_new.php?host_id=<?php print $host["id"];?>">Create Graphs for this Host</a>
				</td>
			</tr>
		</table>
		<br>
		<?php
	}

	html_start_box("<strong>Devices</strong> $header_label", "98%", $colors["header"], "3", "center", "");

	/* preserve the host template id if passed in via a GET variable */
	if (!empty($_GET["host_template_id"])) {
		$fields_host_edit["host_template_id"]["value"] = $_GET["host_template_id"];
	}

	draw_edit_form(array(
		"config" => array("form_name" => "chk"),
		"fields" => inject_form_variables($fields_host_edit, (isset($host) ? $host : array()))
		));

	html_end_box();

	if ((isset($_GET["display_dq_details"])) && (isset($_SESSION["debug_log"]["data_query"]))) {
		html_start_box("<strong>Data Query Debug Information</strong>", "98%", $colors["header"], "3", "center", "");

		print "<tr><td><span style='font-family: monospace;'>" . debug_log_return("data_query") . "</span></td></tr>";

		html_end_box();
	}

	if (!empty($host["id"])) {
		html_start_box("<strong>Associated Graph Templates</strong>", "98%", $colors["header"], "3", "center", "");

		html_header(array("Graph Template Name", "Status"), 2);

		$selected_graph_templates = db_fetch_assoc("select
			graph_templates.id,
			graph_templates.name
			from graph_templates,host_graph
			where graph_templates.id=host_graph.graph_template_id
			and host_graph.host_id=" . $_GET["id"] . "
			order by graph_templates.name");

		$available_graph_templates = db_fetch_assoc("SELECT
			graph_templates.id, graph_templates.name
			FROM snmp_query_graph RIGHT JOIN graph_templates
			ON snmp_query_graph.graph_template_id = graph_templates.id
			WHERE (((snmp_query_graph.name) Is Null)) ORDER BY graph_templates.name");

		$i = 0;
		if (sizeof($selected_graph_templates) > 0) {
		foreach ($selected_graph_templates as $item) {
			$i++;

			/* get status information for this graph template */
			$is_being_graphed = (sizeof(db_fetch_assoc("select id from graph_local where graph_template_id=" . $item["id"] . " and host_id=" . $_GET["id"])) > 0) ? true : false;

			?>
			<tr>
				<td style="padding: 4px;">
					<strong><?php print $i;?>)</strong> <?php print $item["name"];?>
				</td>
				<td>
					<?php print (($is_being_graphed == true) ? "<span style='color: green;'>Is Being Graphed</span> (<a href='graphs.php?action=graph_edit&id=" . db_fetch_cell("select id from graph_local where graph_template_id=" . $item["id"] . " and host_id=" . $_GET["id"] . " limit 0,1") . "'>Edit</a>)" : "<span style='color: #484848;'>Not Being Graphed</span>");?>
				</td>
				<td align='right' nowrap>
					<a href='host.php?action=gt_remove&id=<?php print $item["id"];?>&host_id=<?php print $_GET["id"];?>'><img src='images/delete_icon_large.gif' alt='Delete Graph Template Association' border='0' align='absmiddle'></a>
				</td>
			</tr>
			<?php
		}
		}else{ print "<tr><td><em>No associated graph templates.</em></td></tr>"; }

		?>
		<tr bgcolor="#<?php print $colors["form_alternate1"];?>">
			<td colspan="4">
				<table cellspacing="0" cellpadding="1" width="100%">
					<td nowrap>Add Graph Template:&nbsp;
						<?php form_dropdown("graph_template_id",$available_graph_templates,"name","id","","","");?>
					</td>
					<td align="right">
						&nbsp;<input type="image" src="images/button_add.gif" alt="Add" name="add_gt" align="absmiddle">
					</td>
				</table>
			</td>
		</tr>

		<?php
		html_end_box();

		html_start_box("<strong>Associated Data Queries</strong>", "98%", $colors["header"], "3", "center", "");

		html_header(array("Data Query Name", "Debugging", "Re-Index Method", "Status"), 2);

		$selected_data_queries = db_fetch_assoc("select
			snmp_query.id,
			snmp_query.name,
			host_snmp_query.reindex_method
			from snmp_query,host_snmp_query
			where snmp_query.id=host_snmp_query.snmp_query_id
			and host_snmp_query.host_id=" . $_GET["id"] . "
			order by snmp_query.name");

		$available_data_queries = db_fetch_assoc("select
							snmp_query.id,
							snmp_query.name
							from snmp_query
							order by snmp_query.name");

		$keeper = array();
		foreach ($available_data_queries as $item) {
			if (sizeof(db_fetch_assoc("SELECT snmp_query_id FROM host_snmp_query " .
					" WHERE ((host_id=" . $_GET["id"] . ")" .
					" and (snmp_query_id=" . $item["id"] ."))")) > 0) {
				/* do nothing */
			} else {
				array_push($keeper, $item);
			}
		}

		$available_data_queries = $keeper;

		$i = 0;
		if (sizeof($selected_data_queries) > 0) {
		foreach ($selected_data_queries as $item) {
			$i++;

			/* get status information for this data query */
			$num_dq_items = sizeof(db_fetch_assoc("select snmp_index from host_snmp_cache where host_id=" . $_GET["id"] . " and snmp_query_id=" . $item["id"]));
			$num_dq_rows = sizeof(db_fetch_assoc("select snmp_index from host_snmp_cache where host_id=" . $_GET["id"] . " and snmp_query_id=" . $item["id"] . " group by snmp_index"));

			$status = "success";

			?>
			<tr>
				<td style="padding: 4px;">
					<strong><?php print $i;?>)</strong> <?php print $item["name"];?>
				</td>
				<td>
					(<a href="host.php?action=query_verbose&id=<?php print $item["id"];?>&host_id=<?php print $_GET["id"];?>">Verbose Query</a>)
				</td>
				<td>
					<?php print $reindex_types{$item["reindex_method"]};?>
				</td>
				<td>
					<?php print (($status == "success") ? "<span style='color: green;'>Success</span>" : "<span style='color: green;'>Fail</span>");?> [<?php print $num_dq_items;?> Item<?php print ($num_dq_items == 1 ? "" : "s");?>, <?php print $num_dq_rows;?> Row<?php print ($num_dq_rows == 1 ? "" : "s");?>]
				</td>
				<td align='right' nowrap>
					<a href='host.php?action=query_reload&id=<?php print $item["id"];?>&host_id=<?php print $_GET["id"];?>'><img src='images/reload_icon_small.gif' alt='Reload Data Query' border='0' align='absmiddle'></a>&nbsp;
					<a href='host.php?action=query_remove&id=<?php print $item["id"];?>&host_id=<?php print $_GET["id"];?>'><img src='images/delete_icon_large.gif' alt='Delete Data Query Association' border='0' align='absmiddle'></a>
				</td>
			</tr>
			<?php
		}
		}else{ print "<tr><td><em>No associated data queries.</em></td></tr>"; }

		?>
		<tr bgcolor="#<?php print $colors["form_alternate1"];?>">
			<td colspan="5">
				<table cellspacing="0" cellpadding="1" width="100%">
					<td nowrap>Add Data Query:&nbsp;
						<?php form_dropdown("snmp_query_id",$available_data_queries,"name","id","","","");?>
					</td>
					<td nowrap>Re-Index Method:&nbsp;
						<?php form_dropdown("reindex_method",$reindex_types,"","","1","","");?>
					</td>
					<td align="right">
						&nbsp;<input type="image" src="images/button_add.gif" alt="Add" name="add_dq" align="absmiddle">
					</td>
				</table>
			</td>
		</tr>

		<?php
		html_end_box();
	}

	form_save_button("host.php");
}
    WideImage is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2.1 of the License, or
    (at your option) any later version.
		
    WideImage is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
		
    You should have received a copy of the GNU Lesser General Public License
    along with WideImage; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  **/
require_once dirname(__FILE__) . '/helpers/common.inc.php';
html_header('Get channels');
$chans = array('R' => false, 'G' => false, 'B' => false, 'A' => false);
foreach ($chans as $chan => $value) {
    $chans[$chan] = Request::getInt($chan, false);
}
?>

<form action="?" method="get">

<table>
	<tr>
		<td>
			channels:
<?php 
foreach ($chans as $chan => $value) {
    if ($value) {
Beispiel #10
0
function frameset()
{
    global $path_info, $leftFrameWidth;
    if (!isset($leftFrameWidth)) {
        $leftFrameWidth = 300;
    }
    html_header();
    echo "\r\n    <frameset cols=\"" . $leftFrameWidth . ",*\" framespacing=\"0\">\r\n        <frameset rows=\"0,*\" framespacing=\"0\" frameborder=\"0\">\r\n            <frame src=\"" . $path_info["basename"] . "?frame=1\" name=frame1 border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\">\r\n            <frame src=\"" . $path_info["basename"] . "?frame=2\" name=frame2 border=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n        </frameset>\r\n        <frame src=\"" . $path_info["basename"] . "?frame=3\" name=frame3 border=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n    </frameset>\r\n    </html>";
}
Beispiel #11
0
function edit ($file) {
	global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
	html_header();
	echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
<form action="' . $self . '?tool=Files" method="post">
<table class="dialog">
<tr>
<td class="dialog">
	<textarea name="content" cols="' . $editcols . '" rows="' . $editrows . '" WRAP="off">';
	if (array_key_exists('content', $_POST)) {
		echo $_POST['content'];
	} else {
		$f = fopen($file, 'r');
		while (!feof($f)) {
			echo html(fread($f, 8192));
		}
		fclose($f);
	}
	if (!empty($_POST['user'])) {
		echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
	}
	if (!empty($_POST['basic_auth'])) {
		if ($win) {
			$authfile = str_replace('\\', '/', $directory) . $htpasswd;
		} else {
			$authfile = $directory . $htpasswd;
		}
		echo "\nAuthType Basic\nAuthName &quot;Restricted Directory&quot;\n";
		echo 'AuthUserFile &quot;' . html($authfile) . "&quot;\n";
		echo 'Require valid-user';
	}
	echo '</textarea>
	<hr />
';
	if ($apache && basename($file) == $htpasswd) {
		echo '
	' . word('user') . ': <input type="text" name="user" />
	' . word('password') . ': <input type="password" name="password" />
	<input type="submit" value="' . word('add') . '" />
	<hr />
';
	}
	if ($apache && basename($file) == $htaccess) {
		echo '
	<input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
	<hr />
';
	}
	echo '
	<input type="hidden" name="action" value="edit" />
	<input type="hidden" name="file" value="' . html($file) . '" />
	<input type="hidden" name="dir" value="' . html($directory) . '" />
	<input type="reset" value="' . word('reset') . '" id="red_button" />
	<input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
</td>
</tr>
</table>
<p><a href="' . $self . '?tool=Files&dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
</form>
';
	html_footer();
}
    $author = handle_basic_auth();
} elseif ($authmethod === 'htpasswd') {
    $author = handle_htpasswd_auth();
}
@ob_end_clean();
flush();
$dir = $repos[$defaultrepo];
if (!chdir($dir)) {
    exit('directory not found: ' . $dir);
}
$_handles = array();
$_handlecount = 0;
$md5_empty_string = 'd41d8cd98f00b204e9800998ecf8427e';
$sha1_empty_string = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
$somethingstaged = false;
echo html_header();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['commit_message'])) {
        $commit_message = $_POST['commit_message'];
    } else {
        $commit_message = '';
    }
    debug($_POST);
    if (isset($_POST['change_staged']) && $_POST['change_staged'] && isset($_POST['statushash']) && $_POST['statushash']) {
        handle_change_staged_req();
    } elseif (isset($_POST['commit']) && $_POST['commit'] && isset($_POST['statushash']) && $_POST['statushash'] && isset($_POST['commit_message']) && $_POST['commit_message'] != '') {
        handle_commit_req();
    } elseif (isset($_POST['refresh']) && $_POST['refresh']) {
        handle_refresh_req();
    } elseif (isset($_POST['pull']) && $_POST['pull']) {
        handle_pull_req();
Beispiel #13
0
function package_edit() {
	$_package_id = get_get_var_number("id");

	if (empty($_package_id)) {
		$header_label = "[new]";
	}else{
		$package = api_package_get($_package_id);

		/* get a list of each graph template that is associated with this package */
		$graph_templates = api_package_graph_template_list($_package_id);

		/* get a list of all of the metadata associated with a particular package */
		$metadata_items = api_package_metadata_list($_package_id);

		$header_label = "[edit: " . $package["name"] . "]";
	}

	form_start("packages.php", "form_package");

	/* ==================== Box: Template Packages ==================== */

	html_start_box("<strong>" . _("Template Packages") . "</strong> $header_label");

	_package_field__name("name", (isset($package["name"]) ? $package["name"] : ""), "0");
	_package_field__description("description", (isset($package["description"]) ? $package["description"] : ""), "0");
	_package_field__description_install("description_install", (isset($package["description_install"]) ? $package["description_install"] : ""), "0");
	_package_field__category("category", (isset($package["category"]) ? $package["category"] : ""), "0");
	_package_field__subcategory("subcategory", (isset($package["subcategory"]) ? $package["subcategory"] : ""), "0");
	_package_field__vendor("vendor", (isset($package["vendor"]) ? $package["vendor"] : ""), "0");
	_package_field__model("model", (isset($package["model"]) ? $package["model"] : ""), "0");
	_package_field__author_hdr();
	_package_field__author_type("author_type", (isset($package) ? "existing" : "new"), "0");
	_package_author_field__name("author_name", (isset($package["author_name"]) ? $package["author_name"] : ""), "0");
	_package_author_field__email("author_email", (isset($package["author_email"]) ? $package["author_email"] : ""), "0");
	_package_author_field__user_forum("author_user_forum", (isset($package["author_user_forum"]) ? $package["author_user_forum"] : ""), "0");
	_package_author_field__user_repository("author_user_repository", (isset($package["author_user_repository"]) ? $package["author_user_repository"] : ""), "0");
	_package_author_type_js();

	html_end_box();

	if (!empty($_package_id)) {
		/* ==================== Box: Associated Graph Templates ==================== */

		html_start_box("<strong>" . _("Associated Graph Templates") . "</strong>");
		html_header(array(_("Template Title")), 2);

		if (sizeof($graph_templates) > 0) {
			foreach ($graph_templates as $graph_template) {
				?>
				<tr class="item">
					<td style="padding: 4px;">
						<?php echo $graph_template["template_name"];?>
					</td>
					<td align="right" style="padding: 4px;">
						<a href="packages.php?action=remove_graph_template&id=<?php echo $_package_id;?>&graph_template_id=<?php echo $graph_template["id"];?>"><img src="<?php echo html_get_theme_images_path("delete_icon_large.gif");?>" alt="<?php echo _("Delete Graph Template Association");?>" border="0" align="absmiddle"></a>
					</td>
				</tr>
				<?php
			}
		}else{
			?>
			<tr class="empty">
				<td colspan="2">
					No graph templates have been associated with this package.
				</td>
			</tr>
			<?php
		}

		?>
		<tr>
			<td style="border-top: 1px solid #b5b5b5; padding: 1px;" colspan="2">
				<table width="100%" cellpadding="2" cellspacing="0">
					<tr>
						<td>
							Add graph template:
							<?php form_dropdown("assoc_graph_template_id", api_graph_template_list(), "template_name", "id", "", "", "");?>
						</td>
						<td align="right">
							&nbsp;<input type="image" src="<?php echo html_get_theme_images_path('button_add.gif');?>" alt="<?php echo _('Add');?>" name="assoc_graph_template_add" align="absmiddle">
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<?php

		html_end_box();

		/* ==================== Box: Associated Meta Data ==================== */

		html_start_box("<strong>" . _("Associated Meta Data") . "</strong>", "packages.php?action=edit_metadata&package_id=$_package_id");
		html_header(array(_("Name"), _("Type")), 2);

		if (sizeof($metadata_items) > 0) {
			$metadata_types = api_package_metadata_type_list();

			foreach ($metadata_items as $metadata_item) {
				?>
				<tr class="content-row">
					<td class="content-row" style="padding: 4px;">
						<a class="linkEditMain" href="packages.php?action=edit_metadata&id=<?php echo $metadata_item["id"];?>&package_id=<?php echo $_package_id;?>"><?php echo $metadata_item["name"];?></a>
					</td>
					<td class="content-row" style="padding: 4px;">
						<?php echo $metadata_types{$metadata_item["type"]};?>
					</td>
					<td class="content-row" align="right" style="padding: 4px;">
						<a href="packages.php?action=remove_metadata&id=<?php echo $_package_id;?>&package_metadata_id=<?php echo $metadata_item["id"];?>"><img src="<?php echo html_get_theme_images_path("delete_icon_large.gif");?>" alt="<?php echo _("Delete Package Metadata Item");?>" border="0" align="absmiddle"></a>
					</td>
				</tr>
				<?php
			}
		}else{
			?>
			<tr>
				<td class="content-list-empty" colspan="2">
					No metadata items have been associated with this package.
				</td>
			</tr>
			<?php
		}

		html_end_box();
	}

	form_hidden_box("action_post", "package_edit");
	form_hidden_box("package_id", $_package_id);

	form_save_button("packages.php", "save_package");
}
 function printoutPreview () {
     if ($this->config->getValue("Main", "wholesite"))
         echo html_header($this->config);
     
     if (!$language = $this->config->getValue("Main", "language"))
         $language = "de_DE";
     init_i18n($language);
     
     include($GLOBALS["RELATIVE_PATH_EXTERN"]
             . "/modules/views/persondetails_preview.inc.php");
     
     if ($this->config->getValue("Main", "wholesite"))
         echo html_footer();
 }
<?php

require_once "common-multi.php";
html_header("CSV: Generador de personal a honorarios");
?>


La siguiente planilla le permitir&aacute; elaborar el listado de la dotaci&oacute;n de personal de su organizaci&oacute;n.
<br/><br/>
Art. 7-d: Personal de Honorarios, con sus correspondientes remuneraciones.
<br/><br/>
Paso 1: Descargue la planilla en alguno de los siguientes formatos :
<ul>
 <li><a href="honorarios.xls" target="_NEW">honorarios.xls</a>,
 formato Microsoft Excel 97/XP.</li>
 <li><a href="honorarios.ods" target="_NEW">honorarios.ods</a>,
 formato OpenOffice Calc 2.0.</li>
 <li><a href="honorarios.csv" target="_NEW">honorarios.csv</a>,
 formato CSV delimitado por punto y comas (;).</li>
</ul>

Paso 2: Complete la planilla con los datos solicitados en cada columna,
de acuerdo a lo dispuesto en el art&iacute;culo 7-d de la ley N&deg; 20.285.
<br/><br/>
Paso 3: Guarde su planilla Microsoft Excel u OpenOffice Calc, en formato CSV.
Los archivos CSV (del ingl&eacute;s <i>comma separated values</i>) son un tipo
de documento sencillo para representar datos en forma de tabla.
<br/><br/>
Paso 4: Presione Examinar y seleccione el archivo CSV.
<br/><br/>
Paso 5: Presione "Procesar" para acceder a los descargables de "Dotaci&oacute;n de Personal a Honorarios". 
Beispiel #16
0
function snmpagent_utilities_run_eventlog()
{
    global $item_rows;
    define("MAX_DISPLAY_PAGES", 21);
    $severity_levels = array(SNMPAGENT_EVENT_SEVERITY_LOW => 'LOW', SNMPAGENT_EVENT_SEVERITY_MEDIUM => 'MEDIUM', SNMPAGENT_EVENT_SEVERITY_HIGH => 'HIGH', SNMPAGENT_EVENT_SEVERITY_CRITICAL => 'CRITICAL');
    $severity_colors = array(SNMPAGENT_EVENT_SEVERITY_LOW => '#00FF00', SNMPAGENT_EVENT_SEVERITY_MEDIUM => '#FFFF00', SNMPAGENT_EVENT_SEVERITY_HIGH => '#FF0000', SNMPAGENT_EVENT_SEVERITY_CRITICAL => '#FF00FF');
    $receivers = db_fetch_assoc("SELECT DISTINCT manager_id, hostname FROM snmpagent_notifications_log INNER JOIN snmpagent_managers ON snmpagent_managers.id = snmpagent_notifications_log.manager_id");
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var_request("receiver"));
    if (!in_array(get_request_var_request("severity"), array_keys($severity_levels)) && get_request_var_request("severity") != '-1' && get_request_var_request("severity") != "") {
        die_html_input_error();
    }
    input_validate_input_number(get_request_var_request("page"));
    input_validate_input_number(get_request_var_request("rows"));
    /* ==================================================== */
    /* clean up search filter */
    if (isset($_REQUEST["filter"])) {
        $_REQUEST["filter"] = sanitize_search_string(get_request_var("filter"));
    }
    if (isset($_REQUEST["purge_x"])) {
        db_execute("TRUNCATE table snmpagent_notifications_log;");
        /* reset filters */
        $_REQUEST["clear_x"] = true;
    }
    /* if the user pushed the 'clear' button */
    if (isset($_REQUEST["clear_x"])) {
        kill_session_var("sess_snmpagent__logs_receiver");
        kill_session_var("sess_snmpagent__logs_severity");
        kill_session_var("sess_snmpagent__logs_current_page");
        kill_session_var("sess_snmpagent__logs_filter");
        kill_session_var("sess_default_rows");
        unset($_REQUEST["receiver"]);
        unset($_REQUEST["severity"]);
        unset($_REQUEST["page"]);
        unset($_REQUEST["filter"]);
        unset($_REQUEST["rows"]);
    }
    /* reset the current page if the user changed the severity */
    if (isset($_SESSION["sess_snmpagent__logs_severity"]) && get_request_var_request("severity") != $_SESSION["sess_snmpagent__logs_severity"]) {
        kill_session_var("sess_snmpagent__logs_current_page");
        unset($_REQUEST["page"]);
    }
    /* remember these search fields in session vars so we don't have to keep passing them around */
    load_current_session_value("receiver", "sess_snmpagent__logs_receiver", "-1");
    load_current_session_value("page", "sess_snmpagent__logs_current_page", "1");
    load_current_session_value("severity", "sess_snmpagent__logs_severity", "-1");
    load_current_session_value("filter", "sess_snmpagent__logs_filter", "");
    load_current_session_value('rows', 'sess_default_rows', read_config_option('num_rows_table'));
    /* if the number of rows is -1, set it to the default */
    if ($_REQUEST["rows"] == -1) {
        $_REQUEST["rows"] = read_config_option("num_rows_table");
    }
    $_REQUEST['page_referrer'] = 'view_snmpagent_events';
    load_current_session_value('page_referrer', 'page_referrer', 'view_snmpagent_events');
    ?>
	<script type="text/javascript">
	<!--

	function applyFilter() {
		strURL = 'utilities.php?action=view_snmpagent_events';
		strURL = strURL + '&severity=' + $('#severity').val();
		strURL = strURL + '&receiver=' + $('#receiver').val();
		strURL = strURL + '&rows=' + $('#rows').val();
		strURL = strURL + '&filter=' + $('#filter').val();
		strURL = strURL + '&page=' + $('#page').val();
		strURL = strURL + '&header=false';
		$.get(strURL, function(data) {
			$('#main').html(data);
			applySkin();
		});
	}

	function clearFilter() {
		strURL = 'utilities.php?action=view_snmpagent_events&clear_x=1&header=false';
		$.get(strURL, function(data) {
			$('#main').html(data);
			applySkin();
		});
	}

	$(function(data) {
		$('#refresh').click(function() {
			applyFilter();
		});

		$('#clear').click(function() {
			clearFilter();
		});

		$('#form_snmpagent_notifications').submit(function(event) {
			event.preventDefault();
			applyFilter();
		});
	});

	-->
	</script>

	<?php 
    html_start_box("<strong>SNMPAgent Notification Log</strong>", "100%", "", "3", "center", "");
    ?>
	<tr class='even noprint'>
		<td>
			<form id='form_snmpagent_notifications' name="form_snmpagent_notifications" action="utilities.php">
				<table cellpadding="2" cellspacing="0">
					<tr>
						<td>
							Severity:
						</td>
						<td>
							<select id="severity" name="severity" onChange="applyFilter()">
								<option value="-1"<?php 
    if (get_request_var_request("severity") == "-1") {
        ?>
 selected<?php 
    }
    ?>
>Any</option>
								<?php 
    foreach ($severity_levels as $level => $name) {
        print "<option value='" . $level . "'";
        if (get_request_var_request("severity") == $level) {
            print " selected";
        }
        print ">" . $name . "</option>\n";
    }
    ?>
							</select>
						</td>
						<td>
							Receiver:
						</td>
						<td width="1">
							<select id="receiver" name="receiver" onChange="applyFilter()">
								<option value="-1"<?php 
    if (get_request_var_request("receiver") == "-1") {
        ?>
 selected<?php 
    }
    ?>
>Any</option>
								<?php 
    foreach ($receivers as $receiver) {
        print "<option value='" . $receiver["manager_id"] . "'";
        if (get_request_var_request("receiver") == $receiver["manager_id"]) {
            print " selected";
        }
        print ">" . $receiver["hostname"] . "</option>\n";
    }
    ?>
							</select>
						</td>
						<td>
							Search:
						</td>
						<td>
							<input id='filter' type="text" name="filter" size="25" value="<?php 
    print htmlspecialchars(get_request_var_request("filter"));
    ?>
" onChange='applyFilter()'>
						</td>
						<td>
							Rows:
						</td>
						<td>
							<select id='rows' name="rows" onChange="applyFilter()">
								<option value="-1"<?php 
    if (get_request_var_request("rows") == "-1") {
        ?>
 selected<?php 
    }
    ?>
>Default</option>
								<?php 
    if (sizeof($item_rows) > 0) {
        foreach ($item_rows as $key => $value) {
            print "<option value='" . $key . "'";
            if (get_request_var_request("rows") == $key) {
                print " selected";
            }
            print ">" . htmlspecialchars($value) . "</option>\n";
        }
    }
    ?>
							</select>
						</td>
						<td>
							<input type="submit" id="refresh" name="go" value="Go" title="Set/Refresh Filters">
							<input type="submit" id="clear" name="clear_x" value="Clear" title="Clear Filters">
							<input type="submit" id="purge" name="purge_x" value="Purge" title="Purge Notification Log">
						</td>
					</tr>
				</table>
				<input type='hidden' id='page' name='page' value='<?php 
    print $_REQUEST['page'];
    ?>
'>
			</form>
		</td>
	</tr>
	<?php 
    html_end_box();
    $sql_where = " 1";
    /* filter by severity */
    if (get_request_var_request("receiver") != "-1") {
        $sql_where .= " AND snmpagent_notifications_log.manager_id='" . get_request_var_request("receiver") . "'";
    }
    /* filter by severity */
    if (get_request_var_request("severity") == "-1") {
        /* Show all items */
    } elseif (!empty($_REQUEST["severity"])) {
        $sql_where .= " AND snmpagent_notifications_log.severity='" . get_request_var_request("severity") . "'";
    }
    /* filter by search string */
    if (get_request_var_request("filter") != "") {
        $sql_where .= " AND (`varbinds` LIKE '%%" . get_request_var_request("filter") . "%%')";
    }
    $sql_where .= ' ORDER by `time` DESC';
    $sql_query = "SELECT snmpagent_notifications_log.*, snmpagent_managers.hostname, snmpagent_cache.description FROM snmpagent_notifications_log\n\t\t\t\t\t INNER JOIN snmpagent_managers ON snmpagent_managers.id = snmpagent_notifications_log.manager_id\n\t\t\t\t\t LEFT JOIN snmpagent_cache ON snmpagent_cache.name = snmpagent_notifications_log.notification\n\t\t\t\t\t WHERE {$sql_where} LIMIT " . read_config_option("num_rows_data_source") * (get_request_var_request("page") - 1) . "," . read_config_option("num_rows_data_source");
    /* print checkbox form for validation */
    print "<form name='chk' method='post' action='managers.php'>\n";
    html_start_box("", "100%", "", "3", "center", "");
    $total_rows = db_fetch_cell("SELECT COUNT(*) FROM snmpagent_notifications_log WHERE {$sql_where}");
    $logs = db_fetch_assoc($sql_query);
    /* generate page list */
    $nav = html_nav_bar("utilities.php?action=view_snmpagent_events&severity=" . get_request_var_request("severity") . "&receiver=" . get_request_var_request("receiver") . "&filter=" . get_request_var_request("filter"), MAX_DISPLAY_PAGES, get_request_var_request("page"), get_request_var_request("rows"), $total_rows, 11, '', 'page', 'main');
    print $nav;
    html_header(array(" ", "Time", "Receiver", "Notification", "Varbinds"));
    if (sizeof($logs) > 0) {
        foreach ($logs as $item) {
            $varbinds = strlen(get_request_var_request("filter")) ? preg_replace("/(" . preg_quote(get_request_var_request("filter"), "/") . ")/i", "<span style='background-color: #F8D93D;'>\\1</span>", $item["varbinds"]) : $item["varbinds"];
            form_alternate_row('line' . $item["id"], false);
            print "<td title='Severity Level: " . $severity_levels[$item["severity"]] . "' style='width:10px;background-color: " . $severity_colors[$item["severity"]] . ";border-top:1px solid white;border-bottom:1px solid white;'></td>";
            print "<td style='white-space: nowrap;'>" . date("Y/m/d H:i:s", $item["time"]) . "</td>";
            print "<td>" . $item["hostname"] . "</td>";
            if ($item["description"]) {
                print '<td><a href="#" title="<div class=\'header\'>' . $item["notification"] . '</div><div class=\'content preformatted\'>' . $item["description"] . '</div>" class="tooltip">' . $item["notification"] . '</a></td>';
            } else {
                print "<td>{$item["notification"]}</td>";
            }
            print "<td>{$varbinds}</td>";
            form_end_row();
        }
        print $nav;
    } else {
        print "<tr><td><em>No SNMP Notification Log Entries</em></td></tr>";
    }
    html_end_box();
    ?>

	<script language="javascript" type="text/javascript" >
		$('.tooltip').tooltip({
			track: true,
			position: { collision: "flipfit" },
			content: function() { return $(this).attr('title'); }
		});
	</script>
	<?php 
}
Beispiel #17
0
function start_update()
{
    // The updater
    html_header("Coppermine - Upgrade");
    html_logo();
    test_fs();
    if ($errors != '') {
        html_prereq_errors($errors);
    } else {
        test_sql_connection();
        if ($errors == '') {
            update_tables();
            update_system_thumbs();
        } else {
            html_error($errors);
        }
        if ($errors == '') {
            html_install_success($notes);
            session_destroy();
        } else {
            html_error($errors);
        }
    }
    html_footer();
}
        // add end of table
        $render .= '		
        <table border="0" cellspacing="2" cellpadding="2" width="700">
          <tr> 
            <td align="left">Page: ' . $data['current'] . ' of ' . $data['numpages'] . '</td>
            <td align="right" nowrap>' . $prev . ' &nbsp; ' . $next . '</td>
          </tr>
        </table>
';
    }
    echo html_header("Search Results");
    echo '<div align="center">
<table>' . $render . '</table>
</div>';
} else {
    echo html_header("Client Search");
    ?>
<div align="center">
<form name="form" method="GET">
    <table width="650" border="0" cellpadding="5" cellspacing="3">
      <tr> 
        <td class="pageTitle">Sales Client Search</td>
        <td align="right"><a href="index.php">Main Menu</a></td>
      </tr>
    </table>
    <table width="650" border="0" cellpadding="4" cellspacing="2">
      <tr> 
        <td colspan="4" class="head">Search Criteria</td>
      </tr>
      <tr> 
        <td align="right" class="greyText">Price</td>
Beispiel #19
0
            echo " <input type=\"hidden\" name=\"id\" value=\"{$id}\" />\n";
            echo " <input type=\"hidden\" name=\"wdir\" value=\"{$wdir}\" />\n";
            echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />\n";
            echo " <input type=\"hidden\" name=\"sesskey\" value=\"{$USER->sesskey}\" />\n";
            echo " <input type=\"submit\" value=\"{$strok}\" />\n";
            echo "</form>\n";
            echo "</center>\n";
        } else {
            displaydir($wdir);
        }
        html_footer();
        break;
    case "cancel":
        clearfilelist();
    default:
        html_header($course, $wdir);
        displaydir($wdir);
        html_footer();
        break;
}
/// FILE FUNCTIONS ///////////////////////////////////////////////////////////
function setfilelist($VARS)
{
    global $USER;
    $USER->filelist = array();
    $USER->fileop = "";
    $count = 0;
    foreach ($VARS as $key => $val) {
        if (substr($key, 0, 4) == "file") {
            $count++;
            $val = rawurldecode($val);
Beispiel #20
0
$login_required = TRUE;
$use_theme = 'Beta';
//TODO : Remove this when new UI is completely implemented.
include "includes/page.php";
global $path_prefix;
require_once $path_prefix . '/api/Category/Category.php';
require_once $path_prefix . '/ext/Image/Image.php';
require_once $path_prefix . '/ext/Audio/Audio.php';
require_once $path_prefix . '/ext/Video/Video.php';
require_once $path_prefix . '/ext/Album/Album.php';
// for query count
global $query_count_on_page;
$query_count_on_page = 0;
global $current_theme_path;
$parameter = js_includes("all");
html_header("Media Gallery - {$network_info->name}", $parameter);
if (!$_GET['uid']) {
    $uid = $_SESSION['user']['id'];
} else {
    $uid = $_GET['uid'];
}
/*  Check for the content author id */
if (!empty($_REQUEST["cid"])) {
    $cid = $_REQUEST["cid"];
    $params = array('action' => 'edit_content', 'uid' => $login_uid, 'cid' => $cid);
    if (!user_can($params)) {
        header("Location: {$base_url}/homepage.php?&msg=" . urlencode('Error: You are not authorized to access this page.'));
        exit;
    }
    // It will give the content type whether its an SB Content or a Blogpost
    $obj_content_type = Content::load_content($cid, $uid);
Beispiel #21
0
        }
        $render .= '
	<span class="greyText">Nearest Transport:</span><br>' . $strTransTitle . ' ' . strtolower($strTransType) . '</td>
	</tr>
	</table>
	<p>When you have completed the card in InDesign, save it as P:\\' . $strCardFolder . '\\' . $intPropID . '.indd<br>
	Then export the file and save it as P:\\' . $strCardFolder . '\\' . $intPropID . '.pdf<br>
	When you have finished the card, click <a href="?propID=' . $intPropID . '&action=Update&status=Created&searchLink=' . $searchLink . '">HERE</a></p>
	<p>If you have insufficient images to create a card, please click <a href="?propID=' . $intPropID . '&action=Update&status=Insufficient&searchLink=' . $searchLink . '">HERE</a></p>';
    }
    echo html_header("Create Card");
    echo '<div align="center">
' . $render . '
</div>';
} else {
    echo html_header("Cards Search");
    ?>
<div align="center">
<form method="get">
<table border="1">
  <tr>
    <td>Keyword</td>
    <td><input type="text" name="Keyword" style="width:200px"></td>
    </tr>
  <tr>
    <td>Branch</td>
    <td><select name="Branch" style="width:200px">
            <option value="" selected>Any</option>
            <?php 
    $sqlBranch = "SELECT * FROM branch ORDER BY Branch_Title";
    $qBranch = $db->query($sqlBranch);
* Prepare a HTML form <input> element.
*
* Note: This function will not work correctly if there is a variable in 
*       the main program called $my_field_name.
*
*/
function form_input($my_field_name)
{
    global ${$my_field_name};
    return "<input type=\"text\" name=\"{$my_field_name}\" id=\"{$my_field_name}\" value=\"" . ${$my_field_name} . "\" >";
}
include_once 'misc_functions.php';
include_once 'pgv_connect.php';
include_once 'config.php';
// Generate the HTML page header.
html_header('NS Marriage Record', 'gendat.css');
// Get MarriageID, the primary key for database access, which must be a positive integer.
//
// On the first call to this page, the value of MarriageID is obtained from
// a URL parameter. If the page is then reentered, as a result of the
// "submit" button having been pressed, then the value of MarriageID is obtained
// from a hidden input field, which must have been set on the previous call.
//
if (isset($_POST['submit'])) {
    if (!isset($_POST['MarriageID'])) {
        die('Logic Error');
    }
    $MarriageID = $_POST['MarriageID'];
} else {
    $MarriageID = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
    if ($MarriageID <= 0) {
<h2>Generador de página de mensaje (HTML)</h2>

Si la publicaci&oacute;n de esta informaci&oacute;n no aplica a su servicio o no existen antecedentes asociados, ingrese el mensaje jur&iacute;dico correspondiente para generar la p&aacute;gina HTML de respuesta. 
  <br/><br/>
  
<?php

$opciones=array( "No existe informaci&oacute;n asociada a este &iacute;tem" => ($_SESSION['nombre']?$_SESSION['nombre']:'Esta institución').' no ha dictado una norma general de participación ciudadana.' );
echo formularioExcepcion($opciones,"Norma General de Participaci&oacute;n Ciudadana","msg_ciudadana","ciudadana.html", true);


echo html_footer();*/
require_once "common-multi.php";
require_once "common-msg.php";
html_header("Norma General de Participaci&oacute;n Ciudadana");
?>
La siguiente planilla le permitir&aacute; presentar el detalle de la Norma General de Participaci&oacute;n Ciudadana del organismo.
<br/><br/>
Paso 1: Descargue la planilla en alguno de los siguientes formatos:
<ul>
	<li><a href="normaparticipacion.xls" target="_NEW">normaparticipacion.xls</a>,
	formato Microsoft Excel 97/XP.</li>
	<li><a href="normaparticipacion.ods" target="_NEW">normaparticipacion.ods</a>,
	formato OpenOffice Calc 2.0.</li>
	<li><a href="normaparticipacion.csv" target="_NEW">normaparticipacion.csv</a>,
	formato CSV delimitado por punto y comas (;).</li>
</ul>

Paso 2: Complete la planilla con los datos solicitados en cada columna,
de acuerdo a lo dispuesto en el art&iacute;culo 7-j de la ley N&deg; 20.285.
<?php

require_once "common-multi.php";
html_header("Auditor&iacute;as al Ejercicio Presupuestario");
?>

La siguiente planilla le permitir&aacute; elaborar el detalle de las
auditor&iacute;as al ejercicio presupuestario realizadas a su organismo.
<br/><br/>
Paso 1: Descargue la planilla en alguno de los siguientes formatos:

<ul>
 <li><a href="auditorias.xls" target="_NEW">auditorias.xls</a>,
 formato Microsoft Excel 97/XP.</li>
 <li><a href="auditorias.ods" target="_NEW">auditorias.ods</a>,
 formato OpenOffice Calc 2.0.</li>
 <li><a href="auditorias.csv" target="_NEW">auditorias.csv</a>,
 formato CSV delimitado por punto y comas (;).</li>
</ul>

Paso 2: Complete la planilla con los datos solicitados en cada columna,
de acuerdo a lo dispuesto en el art&iacute;culo 7-l de la ley N&deg; 20.285.
<br/><br/>
Paso 3: Guarde su planilla Microsoft Excel u OpenOffice Calc, en formato CSV.
Los archivos CSV (del ingl&eacute;s <i>comma separated values</i>) son un tipo
de documento sencillo para representar datos en forma de tabla.
<br/><br/>
Paso 4: Presione Examinar y seleccione el archivo CSV.
<br/><br/>
Paso 5: Presione "Procesar" para acceder a los descargables de "Auditor&iacute;as al Ejercicio Presupuestario".
<br/><br/>
Beispiel #25
0
function utilities()
{
    html_start_box("<strong>Cacti System Utilities</strong>", "100%", "", "3", "center", "");
    ?>
	<colgroup span="3">
		<col valign="top" width="20%"></col>
		<col valign="top" width="80%"></col>
	</colgroup>

	<?php 
    html_header(array("Technical Support"), 2);
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=view_tech");
    ?>
'>Technical Support</a>
		</td>
		<td class="textArea">
			Cacti technical support page.  Used by developers and technical support persons to assist with issues in Cacti.  Includes checks for common configuration issues.
		</td>
	</tr>

	<?php 
    html_header(array("Log Administration"), 2);
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=view_logfile");
    ?>
'>View Cacti Log File</a>
		</td>
		<td class="textArea">
			The Cacti Log File stores statistic, error and other message depending on system settings.  This information can be used to identify problems with the poller and application.
		</td>
	</tr>
	<?php 
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=view_user_log");
    ?>
'>View User Log</a>
		</td>
		<td class="textArea">
			Allows Administrators to browse the user log.  Administrators can filter and export the log as well.
		</td>
	</tr>

	<?php 
    html_header(array("Poller Cache Administration"), 2);
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=view_poller_cache");
    ?>
'>View Poller Cache</a>
		</td>
		<td class="textArea">
			This is the data that is being passed to the poller each time it runs. This data is then in turn executed/interpreted and the results are fed into the rrd files for graphing or the database for display.
		</td>
	</tr>
	<?php 
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=view_snmp_cache");
    ?>
'>View SNMP Cache</a>
		</td>
		<td class="textArea">
			The SNMP cache stores information gathered from SNMP queries. It is used by cacti to determine the OID to use when gathering information from an SNMP-enabled host.
		</td>
	</tr>
	<?php 
    form_alternate_row();
    ?>
		<td class="textArea">
			<a href='<?php 
    print htmlspecialchars("utilities.php?action=clear_poller_cache");
    ?>
'>Rebuild Poller Cache</a>
		</td>
		<td class="textArea">
			The poller cache will be cleared and re-generated if you select this option. Sometimes host/data source data can get out of sync with the cache in which case it makes sense to clear the cache and start over.
		</td>
	</tr>

	<?php 
    api_plugin_hook('utilities_list');
    html_end_box();
}
Beispiel #26
0
function host_edit()
{
    global $fields_host_edit, $reindex_types;
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var_request('id'));
    /* ==================================================== */
    api_plugin_hook('host_edit_top');
    if (!empty($_REQUEST['id'])) {
        $host = db_fetch_row_prepared('SELECT * FROM host WHERE id = ?', array($_REQUEST['id']));
        $header_label = '[edit: ' . htmlspecialchars($host['description']) . ']';
    } else {
        $header_label = '[new]';
    }
    if (!empty($host['id'])) {
        ?>
		<table width='100%' align='center'>
			<tr>
				<td class='textInfo' colspan='2'>
					<?php 
        print htmlspecialchars($host['description']);
        ?>
 (<?php 
        print htmlspecialchars($host['hostname']);
        ?>
)
				</td>
				<td rowspan='2' class='textInfo' valign='top' align='right'>
					<span class='linkMarker'>*</span><a class='hyperLink' href='<?php 
        print htmlspecialchars('graphs_new.php?host_id=' . $host['id']);
        ?>
'>Create Graphs for this Device</a><br>
					<span class='linkMarker'>*</span><a class='hyperLink' href='<?php 
        print htmlspecialchars('data_sources.php?host_id=' . $host['id'] . '&ds_rows=30&filter=&template_id=-1&method_id=-1&page=1');
        ?>
'>Data Source List</a><br>
					<span class='linkMarker'>*</span><a class='hyperLink' href='<?php 
        print htmlspecialchars('graphs.php?host_id=' . $host['id'] . '&graph_rows=30&filter=&template_id=-1&page=1');
        ?>
'>Graph List</a>
					<?php 
        api_plugin_hook('device_edit_top_links');
        ?>
				</td>
			</tr>
			<tr>
				<td valign='top' class='textHeader'>
					<div id='ping_results'>Pinging Device&nbsp;<i style='font-size:12px;' class='fa fa-spin fa-spinner'></i><br><br></div>
				</td>
			</tr>
		</table>
		<?php 
    }
    html_start_box("<strong>Device</strong> {$header_label}", '100%', '', '3', 'center', '');
    /* preserve the host template id if passed in via a GET variable */
    if (!empty($_REQUEST['host_template_id'])) {
        $fields_host_edit['host_template_id']['value'] = $_REQUEST['host_template_id'];
    }
    draw_edit_form(array('config' => array('form_name' => 'chk'), 'fields' => inject_form_variables($fields_host_edit, isset($host) ? $host : array())));
    /* we have to hide this button to make a form change in the main form trigger the correct
     * submit action */
    echo "<div style='display:none;'><input type='submit' value='Default Submit Button'></div>";
    html_end_box();
    ?>
	<script type="text/javascript">
	<!--

	// default snmp information
	var snmp_community       = $('#snmp_community').val();
	var snmp_username        = $('#snmp_username').val();
	var snmp_password        = $('#snmp_password').val();
	var snmp_auth_protocol   = $('#snmp_auth_protocol').val();
	var snmp_priv_passphrase = $('#snmp_priv_passphrase').val();
	var snmp_priv_protocol   = $('#snmp_priv_protocol').val();
	var snmp_context         = $('#snmp_context').val();
	var snmp_port            = $('#snmp_port').val();
	var snmp_timeout         = $('#snmp_timeout').val();
	var max_oids             = $('#max_oids').val();

	// default ping methods
	var ping_method    = $('#ping_method').val();
	var ping_port      = $('#ping_port').val();
	var ping_timeout   = $('#ping_timeout').val();
	var ping_retries   = $('#ping_retries').val();

	function setPing() {
		availability_method = $('#availability_method').val();
		ping_method         = $('#ping_method').val();

		switch(availability_method) {
		case '0': // none
			$('#row_ping_method').css('display', 'none');
			$('#row_ping_port').css('display', 'none');
			$('#row_ping_timeout').css('display', 'none');
			$('#row_ping_retries').css('display', 'none');

			break;
		case '2': // snmp
		case '5': // snmp sysDesc
		case '6': // snmp getNext
			$('#row_ping_method').css('display', 'none');
			$('#row_ping_port').css('display', 'none');
			$('#row_ping_timeout').css('display', '');
			$('#row_ping_retries').css('display', '');

			break;
		default: // ping ok
			switch(ping_method) {
			case '1': // ping icmp
				$('#row_ping_method').css('display', '');
				$('#row_ping_port').css('display', 'none');
				$('#row_ping_timeout').css('display', '');
				$('#row_ping_retries').css('display', '');

				break;
			case '2': // ping udp
			case '3': // ping tcp
				$('#row_ping_method').css('display', '');
				$('#row_ping_port').css('display', '');
				$('#row_ping_timeout').css('display', '');
				$('#row_ping_retries').css('display', '');

				break;
			}

			break;
		}
	}

	function setAvailability() {
		if ($('#snmp_version').val() == '0') {
			methods = [ 
				{ value: '0', text: 'None' }, 
				{ value: '3', text: 'Ping' }
			];

			if ($('#availability_method').val() != '3' && $('#availability_method').val() != '0') {
				$('#availability_method').val('3');
			}

			$('#availability_method').replaceOptions(methods, $('#availability_method').val());
		}else{
			methods = [
				{ value: '0', text: 'None' }, 
				{ value: '1', text: 'Ping and SNMP Uptime' }, 
				{ value: '2', text: 'SNMP Uptime' }, 
				{ value: '3', text: 'Ping' }, 
				{ value: '4', text: 'Ping or SNMP Uptime' }, 
				{ value: '5', text: 'SNMP Desc' }, 
				{ value: '6', text: 'SNMP GetNext' }
			];

			$('#availability_method').replaceOptions(methods, $('#availability_method').val());
		}

		switch($('#availibility_method').val()) {
			case '0': // availability none
				$('#row_ping_method').hide();
				$('#ping_method').val(0);
				$('#row_ping_timeout').hide();
				$('#row_ping_port').hide();
				$('#row_ping_timeout').hide();
				$('#row_ping_retrie').hide();

				break;
			case '1': // ping and snmp sysUptime
			case '3': // ping
			case '4': // ping or snmp sysUptime
				if (($('#row_ping_method').css('display', 'none')) ||
					($('#row_ping_method').css('display') == undefined)) {
					$('#ping_method').val(ping_method);
					$('#row_ping_method').css('display', '');
				}

				break;
			case '2': // snmp sysUptime
			case '5': // snmp sysDesc
			case '6': // snmp getNext
				$('#row_ping_method').css('display', 'none');
				$('#ping_method').val(0);

				break;
		}

		if ($('#availability_method-button').length) {
			$('#availability_method').selectmenu('refresh');
		}
	}

	function changeHostForm() {
		setSNMP();
		setAvailability();
		setPing();
	}

	function setSNMP() {
		snmp_version = $('#snmp_version').val();
		switch(snmp_version) {
		case '0': // No SNMP
			$('#row_snmp_username').hide();
			$('#row_snmp_password').hide();
			$('#row_snmp_community').hide();
			$('#row_snmp_auth_protocol').hide();
			$('#row_snmp_priv_passphrase').hide();
			$('#row_snmp_priv_protocol').hide();
			$('#row_snmp_context').hide();
			$('#row_snmp_port').hide();
			$('#row_snmp_timeout').hide();
			$('#row_max_oids').hide();
			break;
		case '1': // SNMP v1
		case '2': // SNMP v2c
			$('#row_snmp_username').hide();
			$('#row_snmp_password').hide();
			$('#row_snmp_community').show();
			$('#row_snmp_auth_protocol').hide();
			$('#row_snmp_priv_passphrase').hide();
			$('#row_snmp_priv_protocol').hide();
			$('#row_snmp_context').hide();
			$('#row_snmp_port').show();
			$('#row_snmp_timeout').show();
			$('#row_max_oids').show();
			break;
		case '3': // SNMP v3
			$('#row_snmp_username').show();
			$('#row_snmp_password').show();
			$('#row_snmp_community').hide();
			$('#row_snmp_auth_protocol').show();
			$('#row_snmp_priv_passphrase').show();
			$('#row_snmp_priv_protocol').show();
			$('#row_snmp_context').show();
			$('#row_snmp_port').show();
			$('#row_snmp_timeout').show();
			$('#row_max_oids').show();
			break;
		}
	}

	$(function() {
		changeHostForm();
		$('#dbghide').click(function(data) {
			$('#dqdebug').fadeOut('fast');
		});

		$.get('host.php?action=ping_host&id='+$('#id').val(), function(data) {
			$('#ping_results').html(data);
		});
	});

	-->
	</script>
	<?php 
    if (isset($_REQUEST['display_dq_details']) && isset($_SESSION['debug_log']['data_query'])) {
        print "<table id='dqdebug' width='100%' class='cactiDebugTable' cellpadding='0' cellspacing='0' border='0' align='center'><tr><td>\n";
        print "<table width='100%' class='cactiTableTitle' cellspacing='0' cellpadding='3' border='0'>\n";
        print "<tr><td class='textHeaderDark'><a name='dqdbg'></a><strong>Data Query Debug Information</strong></td><td class='textHeaderDark' align='right'><a style='cursor:pointer;' id='dbghide' class='linkOverDark'>Hide</a></td></tr>\n";
        print "</table>\n";
        print "<table width='100%' class='cactiTable' cellspacing='0' cellpadding='3' border='0'>\n";
        print "<tr><td class='odd'><span style='font-family: monospace;'>" . debug_log_return('data_query') . "</span></td></tr>";
        print "</table>\n";
        print "</table>\n";
    }
    if (!empty($host['id'])) {
        html_start_box('<strong>Associated Graph Templates</strong>', '100%', '', '3', 'center', '');
        html_header(array('Graph Template Name', 'Status'), 2);
        $selected_graph_templates = db_fetch_assoc_prepared('SELECT
			graph_templates.id,
			graph_templates.name
			FROM (graph_templates, host_graph)
			WHERE graph_templates.id = host_graph.graph_template_id
			AND host_graph.host_id = ?
			ORDER BY graph_templates.name', array($_REQUEST['id']));
        $available_graph_templates = db_fetch_assoc('SELECT
			graph_templates.id, graph_templates.name
			FROM snmp_query_graph RIGHT JOIN graph_templates
			ON (snmp_query_graph.graph_template_id = graph_templates.id)
			WHERE (((snmp_query_graph.name) Is Null)) ORDER BY graph_templates.name');
        $i = 0;
        if (sizeof($selected_graph_templates) > 0) {
            foreach ($selected_graph_templates as $item) {
                form_alternate_row('', true);
                /* get status information for this graph template */
                $is_being_graphed = sizeof(db_fetch_assoc_prepared('SELECT id FROM graph_local WHERE graph_template_id = ? AND host_id = ?', array($item['id'], $_REQUEST['id']))) > 0 ? true : false;
                ?>
					<td style="padding: 4px;">
						<strong><?php 
                print $i;
                ?>
)</strong> <?php 
                print htmlspecialchars($item['name']);
                ?>
					</td>
					<td>
						<?php 
                print $is_being_graphed == true ? "<span style='color: green;'>Is Being Graphed</span> (<a href='" . htmlspecialchars('graphs.php?action=graph_edit&id=' . db_fetch_cell_prepared('SELECT id FROM graph_local WHERE graph_template_id = ? AND host_id = ? LIMIT 0,1', array($item['id'], $_REQUEST['id']))) . "'>Edit</a>)" : "<span style='color: #484848;'>Not Being Graphed</span>";
                ?>
					</td>
					<td align='right' nowrap>
						<a href='<?php 
                print htmlspecialchars('host.php?action=gt_remove&id=' . $item['id'] . '&host_id=' . $_REQUEST['id']);
                ?>
'><img src='images/delete_icon_large.gif' title='Delete Graph Template Association' alt='Delete Graph Template Association' border='0' align='middle'></a>
					</td>
				<?php 
                form_end_row();
                $i++;
            }
        } else {
            print "<tr class='tableRow'><td colspan='2'><em>No associated graph templates.</em></td></tr>";
        }
        ?>
		<tr class='odd'>
			<td class='saveRow' colspan="4">
				<table cellspacing="0" cellpadding="1" width="100%">
					<td nowrap>Add Graph Template:&nbsp;
						<?php 
        form_dropdown('graph_template_id', $available_graph_templates, 'name', 'id', '', '', '');
        ?>
					</td>
					<td align="right">
						&nbsp;<input type="submit" value="Add" name="add_gt_x" title="Add Graph Template to Device">
					</td>
				</table>
			</td>
		</tr>

		<?php 
        html_end_box();
        html_start_box('<strong>Associated Data Queries</strong>', '100%', '', '3', 'center', '');
        html_header(array('Data Query Name', 'Debugging', 'Re-Index Method', 'Status'), 2);
        $selected_data_queries = db_fetch_assoc_prepared('SELECT
			snmp_query.id,
			snmp_query.name,
			host_snmp_query.reindex_method
			FROM (snmp_query, host_snmp_query)
			WHERE snmp_query.id = host_snmp_query.snmp_query_id
			AND host_snmp_query.host_id = ?
			ORDER BY snmp_query.name', array($_REQUEST['id']));
        $available_data_queries = db_fetch_assoc('SELECT
			snmp_query.id,
			snmp_query.name
			FROM snmp_query
			ORDER BY snmp_query.name');
        $keeper = array();
        foreach ($available_data_queries as $item) {
            if (sizeof(db_fetch_assoc_prepared('SELECT snmp_query_id FROM host_snmp_query WHERE host_id = ? AND snmp_query_id = ?', array($_REQUEST['id'], $item['id']))) > 0) {
                /* do nothing */
            } else {
                array_push($keeper, $item);
            }
        }
        $available_data_queries = $keeper;
        $i = 0;
        if (sizeof($selected_data_queries) > 0) {
            foreach ($selected_data_queries as $item) {
                form_alternate_row('', true);
                /* get status information for this data query */
                $num_dq_items = sizeof(db_fetch_assoc_prepared('SELECT snmp_index FROM host_snmp_cache WHERE host_id = ? AND snmp_query_id = ?', array($_REQUEST['id'], $item['id'])));
                $num_dq_rows = sizeof(db_fetch_assoc_prepared('SELECT snmp_index FROM host_snmp_cache WHERE host_id = ? AND snmp_query_id = ? GROUP BY snmp_index', array($_REQUEST['id'], $item['id'])));
                $status = 'success';
                ?>
					<td style="padding: 4px;">
						<strong><?php 
                print $i;
                ?>
)</strong> <?php 
                print htmlspecialchars($item['name']);
                ?>
					</td>
					<td>
						(<a href="<?php 
                print htmlspecialchars('host.php?action=query_verbose&id=' . $item['id'] . '&host_id=' . $_REQUEST['id']);
                ?>
">Verbose Query</a>)
					</td>
					<td>
					<?php 
                print $reindex_types[$item['reindex_method']];
                ?>
					</td>
					<td>
						<?php 
                print $status == 'success' ? "<span style='color: green;'>Success</span>" : "<span style='color: green;'>Fail</span>";
                ?>
 [<?php 
                print $num_dq_items;
                ?>
 Item<?php 
                print $num_dq_items == 1 ? '' : 's';
                ?>
, <?php 
                print $num_dq_rows;
                ?>
 Row<?php 
                print $num_dq_rows == 1 ? '' : 's';
                ?>
]
					</td>
					<td align='right' nowrap>
						<a href='<?php 
                print htmlspecialchars('host.php?action=query_reload&id=' . $item['id'] . '&host_id=' . $_REQUEST['id']);
                ?>
'><img src='images/reload_icon_small.gif' title='Reload Data Query' alt='Reload Data Query' border='0' align='middle'></a>&nbsp;
						<a href='<?php 
                print htmlspecialchars('host.php?action=query_remove&id=' . $item['id'] . '&host_id=' . $_REQUEST['id']);
                ?>
'><img src='images/delete_icon_large.gif' title='Delete Data Query Association' alt='Delete Data Query Association' border='0' align='middle'></a>
					</td>
				<?php 
                form_end_row();
                $i++;
            }
        } else {
            print "<tr class='tableRow'><td colspan='4'><em>No associated data queries.</em></td></tr>";
        }
        ?>
		<tr class='odd'>
			<td class='saveRow' colspan="5">
				<table cellspacing="0" cellpadding="1" width="100%">
					<td nowrap>Add Data Query:&nbsp;
						<?php 
        form_dropdown('snmp_query_id', $available_data_queries, 'name', 'id', '', '', '');
        ?>
					</td>
					<td nowrap>Re-Index Method:&nbsp;
						<?php 
        form_dropdown('reindex_method', $reindex_types, '', '', read_config_option('reindex_method'), '', '');
        ?>
					</td>
					<td align="right">
						&nbsp;<input type="submit" value="Add" name="add_dq_x" title="Add Data Query to Device">
					</td>
				</table>
				<a name='dqtop'></a>
			</td>
		</tr>

		<?php 
        html_end_box();
    }
    form_save_button('host.php', 'return');
    api_plugin_hook('host_edit_bottom');
}
Beispiel #27
0
require_once 'config.inc.php';
require_once 'functions.inc.php';
require_once 'Mendeley.php';
$mendeley = new Mendeley(API_KEY);
if (isset($_GET['gid']) && $_GET['gid'] != "") {
    $gid = $_GET['gid'];
    is_mendeley_group_id($gid) or die('invalid gid');
    if (isset($_GET['format']) && $_GET['format'] == "raw") {
        $json = $mendeley->fetch_docs_in_group($gid);
        format_json($json);
    } else {
        $uuids = $mendeley->get_uuids_in_group($gid);
        if (count($uuids) == 0) {
            echo 'No documents found';
            link_home();
        } else {
            html_header();
            link_home();
            echo '<h3>Documents in group ' . $gid . '</h3>';
            foreach ($uuids as $uuid) {
                $paper = $mendeley->get_document($uuid);
                echo '<P>';
                $paper->format_html();
                echo '</P>';
            }
            html_footer();
        }
    }
} else {
    echo 'No GID given.';
}
<?php

require_once "common-url.php";
html_header("URL: Enlace a Sistema de Gesti&oacute;n de Solicitudes");
?>

Ingrese la URL del Sistema de Gesti&oacute;n de Solicitudes
para su Organismo.

<br/><br/>


<?php 
echo formularioURL("URL: Enlace a Sistema de Gesti&oacute;n de Solicitudes", "La URL del Sistema de Gesti&oacute;n de Solicitudes ha sido actualizada.", "url_solicitudes");
?>



<?php 
html_footer();
Beispiel #29
0
<?php

require_once "common-multi.php";
html_header("CSV: V&iacute;nculos institucionales");
?>


La siguiente planilla le permitir&aacute; presentar las entidades en que
el organismo tenga participaci&oacute;n, representaci&oacute;n e intervenci&oacute;n.
<br/><br/>
Paso 1: Descargue la planilla en alguno de los siguientes formatos:
<ul>
 <li><a href="vinculos.xls" target="_NEW">vinculos.xls</a>,
 formato Microsoft Excel 97/XP.</li>
 <li><a href="vinculos.ods" target="_NEW">vinculos.ods</a>,
 formato OpenOffice Calc 2.0.</li>
 <li><a href="vinculos.csv" target="_NEW">vinculos.csv</a>,
 formato CSV delimitado por punto y comas (;).</li>
</ul>

Paso 2: Complete la planilla con los datos solicitados en cada columna,
de acuerdo a lo dispuesto en el art&iacute;culo 7-m de la ley N&deg; 20.285.
<br/><br/>
Paso 3: Guarde su planilla Microsoft Excel u OpenOffice Calc, en formato CSV.
Los archivos CSV (del ingl&eacute;s <i>comma separated values</i>) son un tipo
de documento sencillo para representar datos en forma de tabla.
<br/><br/>
Paso 4: Presione Examinar y seleccione el archivo CSV.
<br/><br/>
Paso 5: Presione "Procesar" para acceder a los descargables de "V&iacute;nculos Institucionales".
<br/><br/>
Beispiel #30
0
function list_templates()
{
    debug_msg("FUNCTION: " . __FUNCTION__, 3);
    $result = db_multirec_read_all_templates();
    debug_msg("Query Result: {$result}", 5);
    $num_records = count($result);
    debug_msg("Number of records: {$num_records}", 4);
    if ($num_records > 0) {
        html_header("List Templates");
        ?>
<div align="center">
<h1>Template Data</h1>
<br />
<table width="100%" cellpadding="0" align="center">
<tr>
<th colspan="2" class="list"></th>		<!-- Edit/Delete -->
<th class="list">Name</th>					<!-- Name -->
<th class="list">Description</th>		<!-- Description -->
</tr>
<?php 
        for ($i = 0; $i < $num_records; $i++) {
            $row = $result[$i];
            if ($row == '') {
                echo "Cannot seek to row {$record}:\n";
                continue;
            }
            ?>
<tr>
<td class="center-list">
&nbsp;
<a href="template.php?action=edit&amp;id=<?php 
            echo $row['id'];
            ?>
" onmouseover="window.status='Edit';return true" onmouseout="window.status='';return true"><img src="images/edit.png" alt="Edit" border="0" /></a>
&nbsp;
</td>
<td class="center-list">
&nbsp;
<a href="template.php?action=delete&amp;id=<?php 
            echo $row['id'];
            ?>
" onmouseover="window.status='Delete';return true" onmouseout="window.status='';return true"><img src="images/delete.png" alt="Delete" border="0" /></a>
&nbsp;
</td>
<td class="left-list">
<?php 
            echo $row['name'];
            ?>
</td>
<td class="left-list">
<?php 
            echo $row['description'];
            ?>
</td>
</tr>
<?php 
        }
        ?>
</table>
<br />
<table width="100%">
<tr>
<td class="left">
<a href="template.php?action=add" onmouseover="window.status='Add a new template';return true" onmouseout="window.status='';return true"><img src="images/add.png" alt="Add" border="0" /> Add new template</a>
</td>
</tr>
</table>
</div>
<?php 
    }
    html_footer();
}