Диплом: Автоматизация документооборота МКУ «Комитет финансов муниципального образования Слюдянский район»

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
85
.init();
</script>
<br /><br />
<table>
<tr><td> (title):</td><td><input name="title" type="text" value="<? echo
$page_title; ?>" size="60"></td></tr>
<tr><td> (h1):</td><td><input name="h1" type="text" value="<? echo $page_h1;
?>" size="60"></td></tr>
<tr><td> (keywords):</td><td><input name="keys" type="text" value="<? echo
$page_keyws; ?>" size="60"></td></tr>
<tr><td> (description):</td><td><input name="desc" type="text" value="<? echo
$page_descr; ?>" size="60"></td></tr>
<tr><td>:</td><td><input name="link" type="text" value="<? echo $page_4menu;
?>" size="60"></td></tr>
<tr><td> </td><td><input name="alias" type="text" size="60" value="<?php echo
$alias;?>"/></td></tr>
<tr>
<td>Родительская страница</td>
<td>
<select name="parent" size="<?php echo(count($file_menu) + 1); ?>">
<?php
if ( $parent == 0 ) echo('<option value="0" selected>Корень меню</option>');
else echo('<option value="0">Корень меню</option>');
$k = 0;
foreach( $file_menu as $line )
{
$elem[$k] = explode (";", $line);
$k++;
}
function tree($elements,$parent,$ots,$count,$selected)
86
{
for($j = 0; $j < $count; $j++)
{
if( trim($elements[$j][3]) == $parent )
{
if ( trim($elements[$j][0]) == $selected )
echo('<option value="'.$elements[$j][0].'"
selected>'.$ots.trim($elements[$j][2]).'</option>');
else
echo('<option value="'.$elements[$j][0].'">'.$ots.trim($elements[$j][2]).'</option>');
tree($elements,$elements[$j][0],$ots."&nbsp;&nbsp;&nbsp;&nbsp;",$count,$selecte
d);
}
}
}
tree($elem,0,"",count($file_menu),$parent);
?>
</select>
</td>
</tr>
</table>
<input type="submit" value="Сохранить">
</form>
</td>
<td width=210 valign=top align=right>
<table border=0>
<tr>
<td>
87
<iframe src="img.php" frameborder="0" width="210px" height="600px"
marginwidth="0" marginheight="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe src="file.php" frameborder="0" width="210px" height="250px"
marginwidth="0" marginheight="0"></iframe>
</td>
</tr>
<tr>
<td>
<iframe src="link.php" frameborder="0" width="210px" height="200px"
marginwidth="0" marginheight="0"></iframe>
</td>
</tr>
</table>
</td></tr></table>
<?php
}
if (isset($_POST['action']))
{
if (!isset($_POST['text']) || !isset($_POST['title']) || !isset ($_POST['link']) || !isset
($_POST['parent']) || !isset ($_POST['alias']))
{
die ("Не указаны необходимые данные. <a href='index.php'>На главную</a>");
}
$text = stripslashes($_POST['text']);
$text2 = stripslashes($_POST['text2']);
$content = "<?\r\n\$page_title = '" . $_POST['title'] . "';\r\n" .
88
"\$page_h1 = '" . $_POST['h1'] . "';\r\n" .
"\$page_descr = '" . $_POST['desc'] . "';\r\n" .
"\$page_keyws = '" . $_POST['keys'] . "';\r\n" .
"\$page_4menu = '" . $_POST['link'] . "';\r\n\r\n" .
"\$content = <<< EOT\r\n" . $text . "\r\n" .
"EOT;\r\n\r\n" .
"\$subcontent = <<< EOT\r\n" . $text2 . "\r\n" .
"EOT;\r\n?>";
if (!function_exists('file_put_contents'))
{
function file_put_contents ($filename, $content)
{
if ($fp = @fopen($filename, 'w'))
{
$result = fwrite($fp, $content);
fclose ($fp);
return $result;
}
else
{
return false;
}
}
}
if (!file_put_contents("../content/" . $_POST['id'] . ".php", $content)) die ("Ошибка
записи");
else
{
$csvcont='';
$menu_file = file("../menu.csv");
89
foreach($menu_file as $line)
{
$elem = explode(";",$line);
if ( $elem[0] == $_POST['id'])
{
$csvcont =
$csvcont.$_POST['id'].";".$_POST['alias'].";".$_POST['link'].";".$_POST['parent']."\
n";
}
else $csvcont = $csvcont.$line;
}
if(!file_put_contents('../menu.csv', $csvcont)) die();
echo ("Успешно изменено. <a href='index.php'> </a>");
}
}
require_once("footer.php");
?>
Addklientadminfl.php
<?php
class IndexController extends Controller_Action
{
function indexAction() {
//$this->view->table = new Pages();
$path = 'elektroinstrument';
$table = new Categories();
$page = $table->findByPath($path);
$this->view->tcats = $table;
$this->view->tbrands = new Brands();
$this->view->tprods = new Products();
90
$this->view->page = $page;
$this->view->cat = $page;
$this->getHelper('BestFares')->setCategory($page);
$this->view->left = $this->getHelper('BestFares')->render();
$this->view->right = $this->getHelper('Articles')->render();
}
function sitemapAction() {
$tpages = new Pages();
$tcats = new Categories();
$this->view->pages = $tpages->fetchTop();
$this->view->cats = $tcats->fetchTop();
}
public function searchAction()
{
/**
* Setup pager
*/
$pager = new Pj_Pager($this->getRequest()->getParam('p') ? $this->getRequest()-
>getParam('p') : 1, null, 'p', 20);
$this->view->assign('pager', $pager);
if ($this->getRequest()->getParam('search')) {
/**
* Request yandex
*/
$search = $this->getRequest()->getParam('search') . htmlspecialchars(' <<
host="empiretools.ru"');
$client = new Zend_Http_Client('http://xmlsearch.yandex.ru/xmlsearch/');
$xml = '<?xml version="1.0" encoding="utf-8"?>
<request>
<query>' . $search . '</query>
91
<page>' . ($pager->getCurrentPage() - 1) .'</page>
<groupings>
<groupby attr="d" mode="flat" groups-on-page="15" docs-in-group="1" />
</groupings>
</request>';
$client->setRawData($xml);
$response = $client->request(Zend_Http_Client::POST);
$xml = $response->getBody();
/**_
* Parse xml
*/
$res = $this->_parseXml($xml);
$pager->setCountRecords($res['total']);
$this->view->assign('result', $res);
$this->view->assign('pager', $pager);
$this->view->assign('searchString', $this->getRequest()->getParam('search'));
}
}
private function _parseXml($xml)
{
$xml = str_replace('<hlword>', '|strong|', $xml);
$xml = str_replace('</hlword>', '|/strong|', $xml);
$xmlElement = new SimpleXMLElement($xml);
$total = $xmlElement->xpath("//response//results//found[@priority='all']");
$res['total'] = $total[0];
if ($res['total'] <= 0) {
return false;
}
$page = $xmlElement->xpath("//response//results//page");
list($from, $to) = $page[0]->attributes();
92
$res['from'] = $from;
$res['to'] = $to;
$groups = $xmlElement->xpath("//response//results//group//doc");
$res['groups'] = array();
foreach ($groups as $group) {
$row = array();
$tmp = $group->xpath("url");
$row['url'] = $tmp[0];
$tmp = $group->xpath("title");
$row['title'] = $tmp[0];
$row['title'] = str_replace('|strong|', '<strong>', $row['title']);
$row['title'] = str_replace('|/strong|', '</strong>', $row['title']);
$passages = $group->xpath("passages//passage");
$row['passages'] = array();
foreach ($passages as $passage) {
$passage = str_replace('|strong|', '<strong>', $passage);
$passage = str_replace('|/strong|', '</strong>', $passage);
$row['passages'][] = $passage;
}
$res['groups'][] = $row;
}
return $res;
}
}
Redklientadminul.php
<?php
/**
* @version $Id: md_submenu.php,v 1.2 2005/04/28 04:56:49 rhuk Exp $
* @package Mambo
93
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
if (!defined( '_MOS_SUBMENU_MODULE' )) {
/** ensure that functions are declared only once */
define( '_MOS_SUBMENU_MODULE', 1 );
$hilightid = -1;
$menuname = null;
$tab_colors = array();
$tab_color = 'white';
$tab_index = 0;
/**
* Utility function for writing a menu link
*/
function rtGetTabColor() {
global $tab_color;
return $tab_color;
}
function rtGetHilightid() {
global $hilightid;
return $hilightid;
}
function rtGetSubMenuLink( $mitem, $level, $hilight=false , $color_index=false) {
global $Itemid, $mosConfig_live_site, $mainframe, $hilightid, $menuname,
$tab_colors, $tab_color, $tab_index, $forcehilite;
$txt = '';
$id = '';
94
switch ($mitem->type) {
case 'separator':
case 'component_item_link':
break;
case 'content_item_link':
$temp = split("&task=view&id=", $mitem->link);
$mitem->link .= '&Itemid='. $mainframe->getItemid($temp[1]);
break;
case 'url':
if ( eregi( 'index.php\?', $mitem->link ) ) {
if ( !eregi( 'Itemid=', $mitem->link ) ) {
$mitem->link .= '&Itemid='. $mitem->id;
}
}
break;
case 'content_typed':
default:
$mitem->link .= '&Itemid='. $mitem->id;
break;
}
if ($color_index) {
$id .= $tab_colors[($tab_index)%count($tab_colors)];
$tab_index++;
}
// Active Menu highlighting
$current_itemid = trim( mosGetParam( $_REQUEST, 'Itemid', 0 ) );
if ( !$current_itemid && !$hilight ) {
//$id = '';
} else if (($forcehilite && $hilight) || (($current_itemid == $mitem->id || $hilight)
&& !$forcehilite)) {

Смотрите также:

"Автоматизация обработки заявок ООО "Проектно-Строительная Компания"
"Автоматизация процесса аттестации персонала для ООО "Нэт Бай Нэт Холдинг"
"Анализ интернет-активности конкурентов ( на примере конкурентов "Газпром нефть")
"Бухгалтерский учёт и аудит расчётов с подотчётними лицами в организации на примере ООО "ЛОЦ 10""
«Психологическое сопровождение персонала в организации на примере ООО «Крокус»
Cовершенствование деловой оценки персонала в организации (на примере ООО "Даймонд кейтеринг развитие")
IPO - инструмент финансирования деятельности организации. На примере ПАО «Нефтяная компания «Лукойл»
PR как средство продвижения организации (на примере ПАО "Тамбовский завод "Комсомолец им. Н.С. Артемова")
PR-коммуникации в сфере общественного питания (на примере кафе-кондитерской «Cream Cheese»)
SMM как средство повышения эффективности работы учреждений социокультурной сферы (на примере Малого театра)