Разработка информационной системы автоматизации работы сервисного отдела

Необходимость автоматизации бизнес-процессов на предприятии. Характеристика информационной архитектуры проекта, построение модели задачи и информационных потоков, структуры полей таблиц базы данных. Расчет экономической эффективности автоматизации.

Рубрика Программирование, компьютеры и кибернетика
Вид дипломная работа
Язык русский
Дата добавления 22.12.2010
Размер файла 4,0 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

$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>

<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();

$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

* @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 = '';

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)) {

if ($level == 0) {

$tab_color = $id;

$menuname = $mitem->name;

$hilightid = $mitem->id;

}

$id .= 'active_menu';

}

$id = ' class="' . $id . '"';

$mitem->link = ampReplace( $mitem->link );

if ( strcasecmp( substr( $mitem->link,0,4 ), 'http' ) ) {

$mitem->link = sefRelToAbs( $mitem->link );

}

switch ($mitem->browserNav) {

// cases are slightly different

case 1:

// open in a new window

$txt = '<li'. $id . '><a href="'. $mitem->link .'" target="_blank">'. $mitem->name ."</a></li>\n";

break;

case 2:

// open in a popup window

$txt = "<li". $id . "><a href=\"#\" onclick=\"javascript: window.open('". $mitem->link ."', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">". $mitem->name ."</a></li>\n";

break;

case 3:

// don't link it

$txt = '<li'. $id . '><span class="seperator">'. $mitem->name ."</span></li>\n";

break;

default:// formerly case 2

// open in parent window

$txt = '<li'. $id . '><a href="'. $mitem->link .'">'. $mitem->name ."</a></li>\n";

break;

}

return $txt;

}

function rtShowHorizMenu( $menutype) {

global $database, $my, $cur_template, $Itemid, $hilightid, $forcehilite;

global $mosConfig_absolute_path, $mosConfig_shownoauth;

$topnav = '';

if ($mosConfig_shownoauth) {

$sql = "SELECT m.* FROM #__menu AS m"

. "\nWHERE menutype='". $menutype ."' AND published='1' AND parent=0"

. "\nORDER BY ordering";

} else {

$sql = "SELECT m.* FROM #__menu AS m"

. "\nWHERE menutype='". $menutype ."' AND published='1' AND access <= '$my->gid' AND parent=0"

. "\nORDER BY ordering";

}

$database->setQuery( $sql );

$topmenu = $database->loadObjectList( 'id' );

//work out if this should be highlighted

$sql = "SELECT m.* FROM #__menu AS m"

. "\nWHERE menutype='". $menutype ."' AND published='1'";

$database->setQuery( $sql );

$subrows = $database->loadObjectList( 'id' );

$maxrecurse = 5;

$parentid = $Itemid;

//this makes sure toplevel stays hilighted when submenu active

while ($maxrecurse-- > 0) {

$parentid = getParentRow($subrows, $parentid);

if (isset($parentid) && $parentid >= 0 && $subrows[$parentid]) {

$hilightid = $parentid;

} else {

break;

}

}

$links = array();

$i = 0;

foreach ($topmenu as $menuitem) {

$hilight = false;

if (isset($forcehilite) && $forcehilite && $forcehilite == $i++) {

$hilight = true;

} else {

if ($menuitem->id == $hilightid) {

$hilight = true;

}

}

$links[] = rtGetSubMenuLink( $menuitem, 0, $hilight, true );

}

$menuclass = 'toplevel';

if (count( $links )) {

$topnav .= '<ul id="'. $menuclass .'">';

foreach ($links as $link) {

$topnav .= $link;

}

$topnav .= '</ul>';

}

return $topnav;

}

function getParentRow($rows, $id) {

if (isset($rows[$id]) && $rows[$id]) {

if($rows[$id]->parent > 0) {

return $rows[$id]->parent;

}

}

return -1;

}

/**

* Vertically Indented Menu

*/

function rtShowSubMenu( $menutype, $pre=NULL, $post=NULL ) {

global $database, $my, $cur_template, $Itemid;

global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_shownoauth;

$sidenav = '';

/* If a user has signed in, get their user type */

$intUserType = 0;

if($my->gid){

switch ($my->usertype) {

case 'Super Administrator':

$intUserType = 0;

break;

case 'Administrator':

$intUserType = 1;

break;

case 'Editor':

$intUserType = 2;

break;

case 'Registered':

$intUserType = 3;

break;

case 'Author':

$intUserType = 4;

break;

case 'Publisher':

$intUserType = 5;

break;

case 'Manager':

$intUserType = 6;

break;

}

} else {

/* user isn't logged in so make their usertype 0 */

$intUserType = 0;

}

if ($mosConfig_shownoauth) {

$sql = "SELECT m.* FROM #__menu AS m"

. "\nWHERE menutype='". $menutype ."' AND published='1'"

. "\nAND parent > 0"

. "\nORDER BY parent,ordering";

} else {

$sql = "SELECT m.* FROM #__menu AS m"

. "\nWHERE menutype='". $menutype ."' AND published='1' AND access <= '$my->gid'"

. "\nAND parent > 0"

. "\nORDER BY parent,ordering";

}

$database->setQuery( $sql );

$rows = $database->loadObjectList( 'id' );

// establish the hierarchy of the menu

$children = array();

// first pass - collect children

foreach ($rows as $v ) {

$pt = $v->parent;

$list = @$children[$pt] ? $children[$pt] : array();

array_push( $list, $v );

$children[$pt] = $list;

}

// second pass - collect 'open' menus

$open = array( $Itemid );

$count = 20; // maximum levels - to prevent runaway loop

$id = $Itemid;

while (--$count) {

if (isset($rows[$id]) && $rows[$id]->parent > 0) {

$id = $rows[$id]->parent;

$open[] = $id;

} else {

break;

}

}

if (isset($children[$id]) && $children[$id]) {

$sidenav = rtRecurseSubMenu( $id, 1, $children, $open);

}

return $sidenav;

}

/**

* Utility function to recursively work through a vertically indented

* hierarchial menu

*/

function rtRecurseSubMenu( $id, $level, &$children, &$open) {

global $Itemid, $menuname;

$output = "";

$sub_class = "submenu";

if (@$children[$id]) {

//$n = min( $level, count( $indents )-1 );

if ($level == 1 ) {

$output .= "<div class=\"moduletable\"><h3>" . $menuname . " Menu</h3>\n";

$output .= "<ul class=\"" . $sub_class . "\">\n";

} else {

$output .= "<ul>\n";

}

foreach ($children[$id] as $row) {

$output .= rtGetSubMenuLink( $row, $level );

if ( in_array( $row->id, $open )) {

$output .= rtRecurseSubMenu( $row->id, $level+1, $children, $open );

}

}

$output .= "</ul>\n";

if ($level == 1) {

$output .= "</div>\n";

}

}

return $output;

}

function beginsWith( $str, $sub ) {

return ( substr( $str, 0, strlen( $sub )-1 ) == $sub );

}

}

?>

highslide-with-html.js

<?php

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

// needed to seperate the ISO number from the language file constant _ISO

$iso = split( '=', _ISO );

?>

<?php

if ( $my->id ) {

initEditor();

}

mosShowHead();

require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/rt_splitmenu.php");

$forcehilite = false;

$topnav = rtShowHorizMenu('topmenu');

$tabcolor = rtGetTabColor();

$hilightid = rtGetHilightid();

?>

<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet" type="text/css" />

<!--[if lte IE 6]>

<link href="./templates/<?php echo $mainframe->

getTemplate(); ?>/css/template_ie.css" rel="stylesheet" type="text/css" />

<![endif]-->

<style type="text/css">

.shadetabs{

border-bottom: 1px solid gray;

width: 90%; width of menu. Uncomment to change to a specific width */

margin-bottom: 1em;

}

.shadetabs ul{

padding: 3px 0;

margin-left: 0;

margin-top: 1px;

margin-bottom: 0;

font: bold 12px Verdana;

list-style-type: none;

text-align: center; /*set to left, center, or right to align the menu as desired*/

}

.shadetabs li{

display: inline;

margin: 0;

}

.shadetabs li a{

text-decoration: none;

padding: 3px 7px;

margin-right: 3px;

border: 1px solid #778;

color: #2d2b2b;

background: white;

}

.shadetabs li a:visited{

color: #2d2b2b;

}

.shadetabs li a:hover{

text-decoration: underline;

color: #2d2b2b;

}

.shadetabs li.selected{

position: relative;

top: 1px;

}

.shadetabs li.selected a{ /*selected main tab style */

border-bottom-color: white;

}

.shadetabs li.selected a:hover{ /*selected main tab style */

text-decoration: none;

}

#underlinemenu{

margin: 0;

padding: 0;

}

#underlinemenu ul{

margin: 0;

margin-bottom: 0em;

padding-left: 0;

float: left;

font-weight: bold;

width: 100%;

border: 0px solid #DFDFDF;

border-width: 0px 0;

}

* html #underlinemenu ul{ /*IE only rule. Delete extra margin-bottom*/

margin-bottom: 0;

}

#underlinemenu ul li{

display: inline;

}

#underlinemenu ul li a{

float: center;

color:#fff;

font-weight: bold;

font-size:14px;

padding: 0px 10px 4px 10px;

text-decoration: none;

background: transparent;

}

#underlinemenu ul li a:hover{

color: white;

background-color: #transparent;

border-bottom: 4px solid White;

padding-bottom: 4px;

}

body {

margin-left: 0px;

margin-top: 0px;

margin-right: 0px;

margin-bottom: 0px;

background-color: #CC9933;

backgroung-image: url(/templates/beprofessional/images/back.jpg) repeat-x;

}

-->

</style></head>

<body>

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td colspan="2"><img src="/templates/beprofessional/images/top.jpg" width="900" height="65" /></td>

</tr>

<tr>

<td height="29" colspan="2" background="/templates/beprofessional/images/topmenu.jpg"><table width="804" height="29" border="0" align="center" cellpadding="0" cellspacing="0">

<tr>

<td height="29" valign="bottom"><div align="center"><span class="shadetabs"><?php echo $topnav; ?></span></div></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2"><img src="/templates/beprofessional/images/div.jpg" width="900" height="20" /></td>

</tr>

<tr>

<td width="243" valign="top" background="/templates/beprofessional/images/mod.jpg"><table width="201" border="0" align="right" cellpadding="0" cellspacing="0">

<tr>

<td valign="top"><table width="165" border="0" align="right" cellpadding="0" cellspacing="0">

<tr>

<td valign="top"><table width="156" border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><span class="touchdown">

<?php mosLoadModules('left', -2); ?>

</span></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<td width="657" valign="top" background="/templates/beprofessional/images/content.jpg"><table width="640" border="0" align="right" cellpadding="0" cellspacing="0">

<tr>

<td width="561" valign="top"><table width="549" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="549" valign="top"><?php mosMainBody(); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td height="21" valign="top" background="/templates/beprofessional/images/modbottm.jpg">&nbsp;</td>

<td valign="top" background="/templates/beprofessional/images/contentbottom.jpg">&nbsp;</td>

</tr>

<tr>

<td colspan="2"><img src="/templates/beprofessional/images/bottom.jpg" width="900" height="43" border="0" usemap="#Map" /></td>

</tr>

<tr>

<td colspan="2"><div align="center">

<?php include_once('includes/footer.php'); ?>

</div></td>

</tr>

</table>

Размещено на Allbest.ru


Подобные документы

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.