tree.php

<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

class treelist
{

				public $tree = array( );
				public $p = "";
				public $explevels = array( );
				public $expand = array( );
				public $visible = array( );
				public $img_dir = "";
				public $max_depth = 0;
				public $text_width = 100;
				public $exp_link = TRUE;
				public $images = array( );

				public function treelist( $tree, $exp = "", $img_dir = "", $images = array( ) )
				{
								$this->tree = $tree;
								$i = 0;
								for ( ;	$i < count( $this->tree );	++$i	)
								{
												$this->expand[$i] = 0;
												$this->visible[$i] = 0;
												$this->tree[$i][8] = 0;
								}
								$this->p = $exp;
								if ( $exp != "" )
								{
												$this->explevels = explode( "|", $exp );
								}
								if ( !is_array( $this->explevels ) )
								{
												$this->explevels = array( );
								}
								sort( $this->explevels );
								reset( $this->explevels );
								$this->setexpand( );
								$this->setvisible( );
								$this->setimagesdir( $img_dir );
								$this->settreeimages( $images );
								$this->gettreemaxdepth( );
				}

				public function setexpand( )
				{
								$i = 0;
								while ( $i < count( $this->explevels ) )
								{
												$this->expand[$this->explevels[$i]] = 1;
												++$i;
								}
				}

				public function setvisible( )
				{
								$this->visible[0] = 1;
								$i = 0;
								for ( ;	$i < count( $this->explevels );	++$i	)
								{
												$n = $this->explevels[$i];
												if ( $this->visible[$n] == 1 && $this->expand[$n] == 1 )
												{
																$j = $n + 1;
																do
																{
																				if ( $this->tree[$n][0] < $this->tree[$j][0] )
																				{
																								if ( $this->tree[$j][0] == $this->tree[$n][0] + 1 )
																								{
																												$this->visible[$j] = 1;
																								}
																								++$j;
																				}
																} while ( 1 );
												}
								}
				}

				public function gettreemaxdepth( )
				{
								$this->max_depth = 0;
								$i = 0;
								for ( ;	$i < count( $this->tree );	++$i	)
								{
												if ( $this->max_depth < $this->tree[$i][0] )
												{
																$this->max_depth = $this->tree[$i][0];
												}
								}
				}

				public function gettreelist( )
				{
								$lastlevel = $this->max_depth;
								$i = count( $this->tree ) - 1;
								for ( ;	0 <= $i;	--$i	)
								{
												if ( $this->tree[$i][0] < $lastlevel )
												{
																$j = $this->tree[$i][0] + 1;
																for ( ;	$j <= $this->max_depth;	++$j	)
																{
																				$levels[$j] = 0;
																}
												}
												if ( $levels[$this->tree[$i][0]] == 0 )
												{
																$levels[$this->tree[$i][0]] = 1;
																$this->tree[$i][8] = 1;
												}
												else
												{
																$this->tree[$i][8] = 0;
												}
												$lastlevel = $this->tree[$i][0];
								}
								$i = 0;
								for ( ;	$i < $this->max_depth;	++$i	)
								{
												$levels[$i] = 1;
								}
								++$this->max_depth;
								$this->html = ( ( "\n<table cellspacing=0 cellpadding=0 border=0 cols=".( $this->max_depth + 3 ) )." width=".( ( $this->max_depth - 1 ) * 16 + 100 + 1 ) ).">\n";
								$this->html .= "<tr>\n";
								$this->html .= "\t<td width=1></td>\n";
								$i = 0;
								for ( ;	$i < $this->max_depth;	++$i	)
								{
												$this->html .= "\t<td width=16></td>\n";
								}
								$this->html .= "\t<td width=".$this->text_width."></td></tr>\n";
								$cnt = 0;
								while ( $cnt < count( $this->tree ) )
								{
												if ( $this->visible[$cnt] )
												{
																$this->html .= "<tr>\n";
																$i = 0;
																if ( $cnt == 0 )
																{
																				$this->html .= "\t<td width=16></td>\n";
																}
																while ( $i < $this->tree[$cnt][0] - 1 )
																{
																				if ( $levels[$i] == 1 )
																				{
																								$this->html .= "\t<td height=16><img src=\"".$this->images['vertline']."\"></td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['space']."\" style='height:100%;width:100%'></td>\n";
																				}
																				++$i;
																}
																if ( $this->tree[$cnt][8] == 1 )
																{
																				if ( $cnt != 0 )
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['end']."\"></td>\n";
																				}
																				$levels[$this->tree[$cnt][0] - 1] = 0;
																}
																else
																{
																				$this->html .= "\t<td><img src=\"".$this->images['split']."\"></td>\n";
																				$levels[$this->tree[$cnt][0] - 1] = 1;
																}
																if ( $this->tree[$cnt][0] < $this->tree[$cnt + 1][0] )
																{
																				$i = 0;
																				$params = "?p=";
																				$params1 = "";
																				while ( $i < count( $this->expand ) )
																				{
																								if ( $this->expand[$i] == 1 && $cnt != $i || $this->expand[$i] == 0 && $cnt == $i )
																								{
																												$params1 .= $i;
																												$params1 .= "|";
																								}
																								++$i;
																				}
																				$params = $params.$params1."&".$this->tree[$cnt][2];
																				if ( $this->tree[$cnt][1] == "" )
																				{
																								$script = $PATH_INFO;
																				}
																				else
																				{
																								$script = $this->tree[$cnt][1];
																				}
																				if ( $this->expand[$cnt] == 0 )
																				{
																								if ( $this->exp_link )
																								{
																												$this->html .= "\t<td><a href=\"".$script.$params."\"><img src=\"".$this->images['expand']."\" border=no></a></td>\n";
																								}
																								else
																								{
																												$this->html .= "\t<td><img src=\"".$this->images['expand']."\" border=no></td>\n";
																								}
																				}
																				else if ( $this->exp_link )
																				{
																								$this->html .= "\t<td><a href=\"".$script.$params."\"><img src=\"".$this->images['collapse']."\" border=no></a></td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['collapse']."\" border=no></td>\n";
																				}
																}
																else
																{
																				$this->html .= "\t<td><img src=\"".$this->images['leaf']."\"></td>\n";
																}
																if ( $this->tree[$cnt][7] != "" )
																{
																				if ( $this->tree[$cnt][4] == "" )
																				{
																								$this->html .= "\t<td>".$this->tree[$cnt][7]."</td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><a href=\"".$this->tree[$cnt][4]."?p=".$this->p."&".$this->tree[$cnt][5]."\" target=\"".$this->tree[$cnt][6]."\">".$this->tree[$cnt][7]."</a></td>\n";
																				}
																				$tmpcolspan = 0;
																}
																else
																{
																				$tmpcolspan = 1;
																}
																if ( $this->tree[$cnt][4] == "" )
																{
																				$this->html .= "\t<td colspan=".( $this->max_depth - $this->tree[$cnt][0] + $tmpcolspan )." valign=bottom>".$this->tree[$cnt][3]."</td>\n";
																}
																else
																{
																				$this->html .= "\t<td colspan=".( $this->max_depth - $this->tree[$cnt][0] + $tmpcolspan )." valign=bottom><a href=\"".$this->tree[$cnt][4]."?p=".$this->p."&".$this->tree[$cnt][5]."\" target=\"".$this->tree[$cnt][6]."\">".$this->tree[$cnt][3]."</a></td>";
																}
																$this->html .= "</tr>\n";
												}
												++$cnt;
								}
								$this->html .= "</table>\n";
				}

				public function settextwidth( $w )
				{
								$this->text_width = $w;
				}

				public function setexpandlink( $r = TRUE )
				{
								$this->exp_link = $r;
				}

				public function setimagesdir( $dir )
				{
								$this->img_dir = $dir;
				}

				public function settreeimages( $images )
				{
								if ( is_array( $images ) )
								{
												if ( 1 < count( $images ) )
												{
																$this->images = array(
																				"expand" => $this->img_dir.$images['expand'],
																				"collapse" => $this->img_dir.$images['collapse'],
																				"vertline" => $this->img_dir.$images['vertline'],
																				"paralline" => $this->img_dir.$images['paralline'],
																				"split" => $this->img_dir.$images['split'],
																				"end" => $this->img_dir.$images['end'],
																				"leaf" => $this->img_dir.$images['leaf'],
																				"space" => $this->img_dir.$images['space']
																);
												}
												else
												{
																$this->images = array(
																				"expand" => $this->img_dir."tree_expand.gif",
																				"collapse" => $this->img_dir."tree_collapse.gif",
																				"vertline" => $this->img_dir."tree_vertline.gif",
																				"paralline" => $this->img_dir."tree_paralline.gif",
																				"split" => $this->img_dir."tree_split.gif",
																				"end" => $this->img_dir."tree_end.gif",
																				"leaf" => $this->img_dir."tree_leaf.gif",
																				"space" => $this->img_dir."tree_space.gif"
																);
												}
								}
								else
								{
												exit( "Class TreeList: Images setup error!" );
								}
				}

				public function output( )
				{
								$this->gettreelist( );
								return $this->html;
				}

}

class treelistnew extends treelist
{

				public $specialarr = array( );

				public function gettreelist( )
				{
								$lastlevel = $this->max_depth;
								$i = count( $this->tree ) - 1;
								for ( ;	0 <= $i;	--$i	)
								{
												if ( $this->tree[$i][0] < $lastlevel )
												{
																$j = $this->tree[$i][0] + 1;
																for ( ;	$j <= $this->max_depth;	++$j	)
																{
																				$levels[$j] = 0;
																}
												}
												if ( $levels[$this->tree[$i][0]] == 0 )
												{
																$levels[$this->tree[$i][0]] = 1;
																$this->tree[$i][8] = 1;
												}
												else
												{
																$this->tree[$i][8] = 0;
												}
												$lastlevel = $this->tree[$i][0];
								}
								$i = 0;
								for ( ;	$i < $this->max_depth;	++$i	)
								{
												$levels[$i] = 1;
								}
								++$this->max_depth;
								$this->html = ( ( "\n<table cellspacing=0 cellpadding=0 border=0 cols=".( $this->max_depth + 3 ) )." width=".( ( $this->max_depth - 1 ) * 16 + 100 + 1 ) ).">\n";
								$this->html .= "<tr>\n";
								$this->html .= "\t<td width=1></td>\n";
								$i = 0;
								for ( ;	$i < $this->max_depth;	++$i	)
								{
												$this->html .= "\t<td width=16></td>\n";
								}
								$this->html .= "\t<td width=".$this->text_width."></td></tr>\n";
								$cnt = 0;
								while ( $cnt < count( $this->tree ) )
								{
												if ( $this->visible[$cnt] )
												{
																$this->tree[$cnt][10] = $this->tree[$cnt][9] + 1 - $this->tree[$cnt][0];
																$this->html .= "<tr>\n";
																$i = 0;
																if ( $cnt == 0 )
																{
																				$this->html .= "\t<td width=16></td>\n";
																}
																while ( $i < $this->tree[$cnt][0] - 1 )
																{
																				if ( $levels[$i] == 1 )
																				{
																								$this->html .= "\t<td height=16><img src=\"".$this->images['vertline']."\"></td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['space']."\" style='height:100%; width:100%'></td>\n";
																				}
																				++$i;
																}
																$tmpcolspan = 0;
																if ( 0 < $this->specialarr[$cnt]['space'] )
																{
																				$i = 0;
																				for ( ;	$i < $this->specialarr[$cnt]['space'];	++$i	)
																				{
																								$this->html .= "\t<td height=16><img src=\"".$this->images['space']."\"></td>\n";
																								$tmpcolspan -= 1;
																				}
																}
																if ( $this->tree[$cnt][8] == 1 )
																{
																				if ( $cnt != 0 )
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['end']."\"></td>\n";
																				}
																				$levels[$this->tree[$cnt][0] - 1] = 0;
																}
																else
																{
																				$this->html .= "\t<td><img src=\"".$this->images['split']."\"></td>\n";
																				$levels[$this->tree[$cnt][0] - 1] = 1;
																}
																if ( 0 < $this->specialarr[$cnt]['paralline'] )
																{
																				$i = 0;
																				for ( ;	$i < $this->specialarr[$cnt]['paralline'];	++$i	)
																				{
																								$this->html .= "\t<td height=16><img src=\"".$this->images['paralline']."\"></td>\n";
																								$tmpcolspan -= 1;
																				}
																}
																if ( $this->tree[$cnt][0] < $this->tree[$cnt + 1][0] )
																{
																				$i = 0;
																				$params = "?p=";
																				$params1 = "";
																				while ( $i < count( $this->expand ) )
																				{
																								if ( $this->expand[$i] == 1 && $cnt != $i || $this->expand[$i] == 0 && $cnt == $i )
																								{
																												$params1 .= $i;
																												$params1 .= "|";
																								}
																								++$i;
																				}
																				$params = $params.$params1."&".$this->tree[$cnt][2];
																				if ( $this->tree[$cnt][1] == "" )
																				{
																								$script = $PATH_INFO;
																				}
																				else
																				{
																								$script = $this->tree[$cnt][1];
																				}
																				if ( $this->expand[$cnt] == 0 )
																				{
																								if ( $this->exp_link )
																								{
																												$this->html .= "\t<td><a href=\"".$script.$params."\"><img src=\"".$this->images['expand']."\" border=no></a></td>\n";
																								}
																								else
																								{
																												$this->html .= "\t<td><img src=\"".$this->images['expand']."\" border=no></td>\n";
																								}
																				}
																				else if ( $this->exp_link )
																				{
																								$this->html .= "\t<td><a href=\"".$script.$params."\"><img src=\"".$this->images['collapse']."\" border=no></a></td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><img src=\"".$this->images['collapse']."\" border=no></td>\n";
																				}
																}
																else
																{
																				$this->html .= "\t<td><img src=\"".$this->images['leaf']."\"></td>\n";
																}
																if ( $this->tree[$cnt][7] != "" )
																{
																				if ( $this->tree[$cnt][4] == "" )
																				{
																								$this->html .= "\t<td>".$this->tree[$cnt][7]."</td>\n";
																				}
																				else
																				{
																								$this->html .= "\t<td><a href=\"".$this->tree[$cnt][4]."?p=".$this->p."&".$this->tree[$cnt][5]."\" target=\"".$this->tree[$cnt][6]."\">".$this->tree[$cnt][7]."</a></td>\n";
																				}
																				$tmpcolspan += 0;
																}
																else
																{
																				$tmpcolspan += 1;
																}
																if ( $this->tree[$cnt][4] == "" )
																{
																				$this->html .= "\t<td colspan=".( $this->max_depth - $this->tree[$cnt][0] + $tmpcolspan )." valign=bottom>".$this->tree[$cnt][3]."</td>\n";
																}
																else
																{
																				$this->html .= "\t<td colspan=".( $this->max_depth - $this->tree[$cnt][0] + $tmpcolspan )." valign=bottom><a href=\"".$this->tree[$cnt][4]."?p=".$this->p."&".$this->tree[$cnt][5]."\" target=\"".$this->tree[$cnt][6]."\">".$this->tree[$cnt][3]."</a></td>";
																}
																$this->html .= "</tr>\n";
												}
												++$cnt;
								}
								$this->html .= "</table>\n";
				}

				public function getspecialarr( )
				{
								$i = 0;
								for ( ;	$i < count( $this->tree );	++$i	)
								{
												$interval = $this->tree[$i][9] + 1 - $this->tree[$i][0];
												if ( 0 < $interval )
												{
																if ( isset( $this->specialarr[$this->tree[$i][10]]['paralline'] ) )
																{
																				$this->specialarr[$i]['space'] = $this->specialarr[$this->tree[$i][10]]['paralline'];
																}
																else
																{
																				$this->specialarr[$i]['space'] = 0;
																}
																$this->specialarr[$i]['paralline'] = $interval - $this->specialarr[$i]['space'];
												}
								}
				}

}

?>

setup.php


<?
include_once("oa_config.php");//用户自己配置文件
include_once("caste_ini.php");//职务级别初始化

//-------------------个别系统属性设置标志------------------
$PROJECT_ATTRIBUTE["name"]="CHY"; //使用工程属性标志,对工程中专用代码进行屏蔽

/*
$OaSystemSetup["知会发送人可删除"]=false;
$OaSystemSetup["知会接收人可删除"]=false;

$OaSystemSetup["普通消息发送人可删除"]=false;
$OaSystemSetup["普通消息接收人可删除"]=false;

$OaSystemSetup["提醒发送人可删除"]=false;
$OaSystemSetup["提醒接收人可删除"]=false;

$OaSystemSetup["短消息"]=true;
$OaSystemSetup["短消息资费"]=0.10;
*/

//报表解释器中的关联附表允许设置的最多个数
$OaSystemSetup["bbjssubnum"]=15;
//报表解释器中的模板允许设置的最多个数
$OaSystemSetup["bbjsmbnum"]=10;
//报表解释器中的特殊计算允许设置的最多个数
$OaSystemSetup["bbjsspecnum"]=10;
//-----------------设置日程表中的数据属性类型------------------------------
//#336600自己的日程  #993399自己发给别人的日程 #990000别人的日程
$New_DataType[0][0]='自发日程';
$New_DataType[1][0]='委派日程';
$New_DataType[2][0]='接受委派日程';
$New_DataType[0][1]='#336600';
$New_DataType[1][1]='#993399';
$New_DataType[2][1]='#990000';
//语言定义
//对于语言的定义:0-混合 1-中文简 2-英文 3-中文繁
$gYuYanS[1]="中文"; //显示用
$gYuYanU[1]="gb2312"; //目录用
$gYuYanE[1]="simp chinese"; //英文显示用
$gYuYanS[2]="英文"; //显示用
$gYuYanU[2]="english"; //目录用
$gYuYanE[2]="english"; //英文显示用
$NbwUserLanguage=1;

//$cfgTempletItem="prj|cal|detail|field|flow|command|photo|attach|reldb|reldata|act|rshow"; //卡片模板设置,两头不能加|
//===============动作配置文件================

//--------------------------0:单条数据动作(支持扩展url)------------------
//$NBW_ACTSEL["列表"] =1 选用 =2 缺省使用
//$NBW_ACTJH["列表"] =0 常显 =1 激活时显示 =2 封存后显示
//$NBW_ACTCHECK["编辑"] =4 (endflag 的二进制 *****1** 的第四位为 1 则显示 “编辑” 这个动作)
//$NBW_ACTSETUP["编辑"] =0 显示模式 =1 列表模式
$NBW_ACTION_ORDER="{任务|催办|回复|添加|编辑|删除|超删|导出报表编辑}={0{1|{0}|2|{0}|3|{0}|4|{0}|5|{0}|6|{0}|7|{0}|8}0}";//add by 宋萌2004-1-1用于动作的排序

//--------------------------1:多条数据动作------------------
$NBW_ACTION["批量显示"]="cardslistshow.php3";
$NBW_ACTYPE["批量显示"]=1;
$NBW_ACTSEL["批量显示"]=2;
$NBW_ACTJH["批量显示"]=0;
$NBW_ACTICON["批量显示"]="/images/action/view.gif";
$NBW_ACTALERT["批量显示"]=0;

$NBW_ACTION["批量删除"]="carddel.php3";
$NBW_ACTYPE["批量删除"]=1;
$NBW_ACTSEL["批量删除"]=1;
$NBW_ACTJH["批量删除"]=0;
$NBW_ACTICON["批量删除"]="/images/action/del.gif";
$NBW_ACTALERT["批量删除"]=1;
$NBW_ACTSETUP["批量删除"]=1;

$NBW_ACTION["导出EXCEL文件"]="cardstoexcel.php";
$NBW_ACTYPE["导出EXCEL文件"]=1;
$NBW_ACTSEL["导出EXCEL文件"]=1;
$NBW_ACTJH["导出EXCEL文件"]=0;
$NBW_ACTICON["导出EXCEL文件"]="/images/action/play.gif";
$NBW_ACTALERT["导出EXCEL文件"]=1;
$NBW_ACTSETUP["导出EXCEL文件"]=1;

//--------------------------2:流程动作------------------
$NBW_ACTION["开始"]="cardstart.php3";$NBW_ACTYPE["开始"]=2;
$NBW_ACTION["创建数据"]="cardedit.php3";$NBW_ACTYPE["创建数据"]=2;
$NBW_ACTION["审批"]="cardshenpi.php3";$NBW_ACTYPE["审批"]=2;
$NBW_ACTION["取消"]="cardquxiao.php3";$NBW_ACTYPE["取消"]=2;
$NBW_ACTION["工作明细"]="lcshowdetail.php3";$NBW_ACTYPE["工作明细"]=2;
$NBW_ACTION["结束"]="cardwancheng.php3";$NBW_ACTYPE["结束"]=2;
$NBW_ACTION["意见"]="cardtianxyj.php3";$NBW_ACTYPE["意见"]=2;
//$NBW_ACTION["填写报表"]="cardtianxbg.php3";$NBW_ACTYPE["填写报表"]=2;
//$NBW_ACTION["归档"]="cardsgd.php3";$NBW_ACTYPE["归档"]=2;
$NBW_ACTION["修订数据"]="cardedit.php3";$NBW_ACTYPE["修订数据"]=2;
$NBW_ACTION["自定义动作"]="lc_customact.php";$NBW_ACTYPE["自定义动作"]=2;
$NBW_ACTION["条件判断"]="lc_condition.php";$NBW_ACTYPE["条件判断"]=2;//add by jollier 2002-9-21
$NBW_ACTION["工程动作"]="lc_projectact.php";$NBW_ACTYPE["工程动作"]=2;//add by jollier 2002-9-21
//以下是流程随意传递模块的流程动作
$NBW_ACTION["群填意见"]="lc_sycd.php";$NBW_ACTYPE["群填意见"]=2;//add by jollier 2002-9-27
$NBW_ACTION["表决"]="lc_sycd.php";$NBW_ACTYPE["表决"]=2;//add by jollier 2002-9-27
$NBW_ACTION["公文传递"]="lc_sycd.php";$NBW_ACTYPE["公文传递"]=2;//add by jollier 2002-9-27
//流程打印动作
$NBW_ACTION["打印报表"]="lc_print.php";$NBW_ACTYPE["打印报表"]=2;//add by jollier 2002-10-27

$NBW_ACTION["档案归库"]="lc_archives.php";$NBW_ACTYPE["档案归库"]=2;//add by lmf 2003-08-06

//带有动作参数=使用表格模板(添加那种表格)
//--------------------------3:基本动作------------------
$NBW_ACTION["列表"]="cardslist.php3";
$NBW_ACTYPE["列表"]=3;
$NBW_ACTSEL["列表"]=2;
$NBW_ACTJH["列表"]=0;
$NBW_ACTICON["列表"]="/images/action/list.gif";

$NBW_ACTION["添加"]="cardinst.php3";
$NBW_ACTYPE["添加"]=3;
$NBW_ACTSEL["添加"]=1;
$NBW_ACTJH["添加"]=0;
$NBW_ACTICON["添加"]="/images/action/add.gif";
$NBW_ACTSETUP["添加"]=1;//用于在列表模式下的动作设置

$NBW_ACTION["编辑"]="cardedit.php3";
$NBW_ACTYPE["编辑"]=3;
$NBW_ACTSEL["编辑"]=1;
$NBW_ACTJH["编辑"]=1;
$NBW_ACTICON["编辑"]="/images/action/edit.gif";
$NBW_ACTCHECK["编辑"]=4;

$NBW_ACTION["详细"]="cardshow.php3";
$NBW_ACTYPE["详细"]=3;
$NBW_ACTJH["详细"]=0;

$NBW_ACTION["删除"]="carddel.php3";
$NBW_ACTYPE["删除"]=3;
$NBW_ACTSEL["删除"]=1;
$NBW_ACTJH["删除"]=1;
$NBW_ACTICON["删除"]="/images/action/del.gif";
$NBW_ACTCHECK["删除"]=8;

/*
$NBW_ACTION["归档"]="cardtoarvs.php";
$NBW_ACTYPE["归档"]=3;
$NBW_ACTSEL["归档"]=0;
$NBW_ACTICON["归档"]="/images/action/archives.gif";
*/
/*
$NBW_ACTION["导出报表编辑"]="excelout.php";
$NBW_ACTYPE["导出报表编辑"]=3;
$NBW_ACTSEL["导出报表编辑"]=1;
$NBW_ACTJH["导出报表编辑"]=0;
$NBW_ACTICON["导出报表编辑"]="/images/action/excelout.gif";
$NBW_ACTCHECK["导出报表编辑"]=16;
*/
$NBW_ACTCHECK["自定义动作"]=16;
$NBW_ACTCHECK["附件编辑"]=32;
$NBW_ACTCHECK["主数据封存"]=64;//主数据封存,关联数据不封存 jollier 2002-12-17
$NBW_ACTCHECK["关联数据封存"]=128;//主数据库封存,关联数据库也封存,如果关联数据endflag=0,则endflag=1;否则不变
$NBW_ACTCHECK["关联数据添加"]=256;//主数据封存,关联数据允许添加 jollier 2002-12-17
//$NBW_ACTCHECK["关联数据不可添加"]=512;主数据封存,关联数据不允许添加
/*$NBW_ACTION["超删"]="zdy_del.php3";
$NBW_ACTYPE["超删"]=3;
$NBW_ACTSEL["超删"]=2;
$NBW_ACTJH["超删"]=0;
$NBW_ACTICON["超删"]="/images/action/del.gif";*/

$NBW_ACTION["图片上传"]="uploadpic.php3";
$NBW_ACTYPE["图片上传"]=3;
$NBW_ACTSEL["图片上传"]=0;
$NBW_ACTICON["图片上传"]="/images/action/pic.gif";
$NBW_ACTCHECK["图片上传"]=32;

$NBW_ACTION["文件管理"]="uploadfile.php3";
$NBW_ACTYPE["文件管理"]=3;
$NBW_ACTSEL["文件管理"]=0;
$NBW_ACTICON["文件管理"]="/images/action/file.gif";
$NBW_ACTCHECK["文件管理"]=32;

//--------------------------4:指挥动作------------------
$NBW_ACTION["任务"]="sendtotask.php3";
$NBW_ACTYPE["任务"]=4;
$NBW_ACTSEL["任务"]=1;
$NBW_ACTJH["任务"]=0;
$NBW_ACTICON["任务"]="/images/action/task.gif";

$NBW_ACTION["来源"]="sendtotask.php3";
$NBW_ACTYPE["来源"]=4;
$NBW_ACTSEL["来源"]=0;
$NBW_ACTJH["来源"]=0;
$NBW_ACTICON["来源"]="/images/action/task.gif";

/*
$NBW_ACTION["任务结束"]="sendmessage.php3";
$NBW_ACTYPE["任务结束"]=4;
$NBW_ACTSEL["任务结束"]=1;
$NBW_ACTICON["任务结束"]="/images/desk/efficet.gif";

$NBW_ACTION["完成"]="cardorder.php3";
$NBW_ACTYPE["完成"]=4;
$NBW_ACTSEL["完成"]=1;
$NBW_ACTICON["完成"]="/images/action/over.gif";
*/

//--------------------------5:系统动作-(不做权限处理)-----------------
$NBW_ACTION["显示流程图"]="lctdraw.php3";
$NBW_ACTYPE["显示流程图"]=5;

$NBW_ACTION["发送消息"]="sendmessage.php3";
$NBW_ACTYPE["发送消息"]=5;
$NBW_ACTSEL["发送消息"]=0;
$NBW_ACTICON["发送消息"]="/images/action/message.gif";
$NBW_ACTION_BT['发送消息']="";

$NBW_ACTION["提醒"]="sendmessage.php3";
$NBW_ACTYPE["提醒"]=5;
$NBW_ACTSEL["提醒"]=0;
$NBW_ACTICON["提醒"]="/images/action/time.gif";

$NBW_ACTION["催办"]="sendmessage.php3";
$NBW_ACTYPE["催办"]=5;
$NBW_ACTSEL["催办"]=1;
$NBW_ACTJH["催办"]=1;
$NBW_ACTICON["催办"]="/images/action/quick.gif";

$NBW_ACTION["消息显示"]="cardshow.php3";
$NBW_ACTYPE["消息显示"]=5;

$NBW_ACTION["数据更新"]="dataupdate.php3";
$NBW_ACTYPE["数据更新"]=5;

$NBW_ACTION["回复"]="sendmessage.php3";
$NBW_ACTYPE["回复"]=5;
$NBW_ACTSEL["回复"]=1;
$NBW_ACTJH["回复"]=1;
$NBW_ACTICON["回复"]="/images/action/revert.gif";

$NBW_ACTION["封存"]="cardlock.php3";
$NBW_ACTYPE["封存"]=5;
$NBW_ACTSEL["封存"]=2;
$NBW_ACTJH["封存"]=1;
$NBW_ACTICON["封存"]="/images/action/lock.gif";

$NBW_ACTION["激活"]="cardunlock.php3";
$NBW_ACTYPE["激活"]=5;
$NBW_ACTSEL["激活"]=2;
$NBW_ACTJH["激活"]=2;
$NBW_ACTICON["激活"]="/images/action/unlock.gif";

$NBW_ACTION["知会"]="sendmessage.php3";
$NBW_ACTYPE["知会"]=5;
$NBW_ACTSEL["知会"]=2;
$NBW_ACTJH["知会"]=0;
$NBW_ACTICON["知会"]="/images/action/warn.gif";

//$NBW_ACTION["外部操作"]=".php3";
//$NBW_ACTYPE["外部操作"]=5;

//--------------------------6:报表动作------------------
$NBW_ACTION["报表进入"]="showbgxx.php3";
$NBW_ACTYPE["报表进入"]=6;

//$NBW_ACTION["报表显示"]="showbg.php3";$NBW_ACTYPE["报表显示"]=6;
//$NBW_ACTION["单步完成"]="cardwancheng.php3";
//$NBW_ACTION["多步完成"]="cardwancheng.php3";
//$NBW_ACTION["显示说明"]="lcshowms.php3";
//$NBW_ACTION["审阅"]="cardshenyue.php3";
//$NBW_ACTION["下发"]="cardxiafa.php3";
//$NBW_ACTION["通知"]="cardtongzhi.php3";
//$NBW_ACTION["上报"]="cardshangbao.php3";
//$NBW_ACTION["确认"]="cardqueren.php3";

//流程起用的动作
$LC_ACT[]='开始';
$LC_ACT[]='取消';
$LC_ACT[]='结束';
$LC_ACT[]='创建数据';
$LC_ACT[]='审批';
//$LC_ACT[]='显示说明';
$LC_ACT[]='工作明细';
$LC_ACT[]='意见';
//$LC_ACT[]='审阅';
//$LC_ACT[]='下发';
//$LC_ACT[]='通知';
//$LC_ACT[]='上报';
//$LC_ACT[]='确认';
$LC_ACT[]='填写报表';
$LC_ACT[]='归档';
$LC_ACT[]='修订数据';
$LC_ACT[]='自定义动作';
$LC_ACT[]='条件判断';
$LC_ACT[]='工程动作';
$LC_ACT[]='群填意见'; //add by jollier 2002-9-27
//$LC_ACT[]='表决'; //add by jollier 2002-9-27
$LC_ACT[]='打印报表'; //add by jollier 2002-10-27
if($OaSystemSetup["档案管理"])
$LC_ACT[]='档案归库'; //add by lmf 2003-08-06
//流程中的预警时间的设置,add by jollier 2002-9-23
$LC_YJSJ["10分钟"]=600;
$LC_YJSJ["30分钟"]=1800;
$LC_YJSJ["1小时"]=3600;
$LC_YJSJ["2小时"]=7200;
$LC_YJSJ["4小时"]=14400;
$LC_YJSJ["8小时"]=28800;
$LC_YJSJ["1天"]=86400;
$LC_YJSJ["2天"]=172800;
$LC_YJSJ["3天"]=259200;
$LC_YJSJ["4天"]=345600;
$LC_YJSJ["5天"]=432000;
$LC_YJSJ["6天"]=518400;
$LC_YJSJ["10天"]=864000;
$LC_YJSJ["15天"]=1296000;
$LC_YJSJ["30天"]=2592000;

$LC_ACT_STRING=",创建数据,修订数据,自定义动作"; //用于流程 fan shijie modify 2002-1-25

//附件格式/资料库的图形文件
$UploadFileExtPic["avi"]='avi.gif';
$UploadFileExtPic["bmp"]='bmp.gif';
$UploadFileExtPic["doc"]='doc.gif';
$UploadFileExtPic["default"]='file.gif';
$UploadFileExtPic["exe"]='exe.gif';
$UploadFileExtPic["gif"]='gif.gif';
$UploadFileExtPic["htm"]='htm.gif';
$UploadFileExtPic["html"]='htm.gif';
$UploadFileExtPic["jpg"]='jpg.gif';
$UploadFileExtPic["jpeg"]='jpg.gif';
$UploadFileExtPic["mid"]='mid.gif';
$UploadFileExtPic["midi"]='mid.gif';
$UploadFileExtPic["mp3"]='mp3.gif';
$UploadFileExtPic["mp4"]='mp4.gif';
$UploadFileExtPic["pdf"]='pdf.gif';
$UploadFileExtPic["ppt"]='ppt.gif';
$UploadFileExtPic["pps"]='pps.gif';
$UploadFileExtPic["psd"]='psd.gif';
$UploadFileExtPic["txt"]='txt.gif';
$UploadFileExtPic["wav"]='wav.gif';
$UploadFileExtPic["wave"]='wav.gif';
$UploadFileExtPic["xls"]='xls.gif';
$UploadFileExtPic["zip"]='zip.gif';
$UploadFileExtPic["system_bg"]='table.gif';

/*
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
$UploadFileExtPic[""]='fi0.gif';
*/
/*
modify by zjb
$DEFAULT_VALUE[] 是一个获取缺省值的函数对应表
用于指定缺省值函数和中文描述相对应

*/
$DEFAULT_VALUE["当前日期"] ="fgetdate";
$DEFAULT_VALUE["当前时间"] ="fgettime";
$DEFAULT_VALUE["当前日期时间"] ="fgetdatetime";

//$DEFAULT_USER_ACT='{0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19}={0{{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}||{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{封存|{1}|lock.gif|{1}|(`^3~!endflag`^4~==0) `^1~ (`^3~`^5~详细`^4~==1)|{1}|2|{1}|endflag=4}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{激活|{1}|unlock.gif|{1}|(`^3~!endflag`^4~==4) `^1~ (`^3~^超级用户`^4~==1)|{1}|2|{1}|endflag=0}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}|{0}|{ACT|ICON|IF|TYPE|STR}={1{|{1}||{1}||{1}|0|{1}|}1}}0}';
$DEFAULT_USER_ACT='';

$NBW_JIBIE2=array_flip ($NBW_JIBIE);

//---------------------Cardshow使用的模块列表--------------------------------
$cardshow_default_setup='{|detail|act|field|flow|photo|attach|reldb|command|lcsycd}={0{0|{0}|1|{0}|1|{0}|1|{0}|1|{0}|1|{0}|1|{0}|1|{0}|1|{0}|1}0}';

//规范:由于英文名称使用文件名,因此要求一律小写
$CardShowMod['主界面']='detail';
$CardShowMod['公文流转模块']='gwlz';
$CardShowMod['动作区显示']='act';
$CardShowMod['消息动作']='msgact';
//$CardShowMod['自定义动作显示']='showactrw';
$CardShowMod['数据库数据显示']='field';
$CardShowMod['流程显示']='flow';
$CardShowMod['图形附件显示']='photo';
$CardShowMod['文件附件显示']='attach';
$CardShowMod['关联数据显示']='reldb';
//$CardShowMod['']='showReldata';
$CardShowMod['传递信息显示']='command';
//$CardShowMod['任务库']='showCommandRW';
$CardShowMod['日视图显示']='rshow';
$CardShowMod['日历显示']='calender';
$CardShowMod['资源管理显示']='resource';
$CardShowMod['甘特图显示']='prj';
$CardShowMod['在线会议显示']='meet';
$CardShowMod['流程随意传递']='lcsycd';
$CardShowMod['流程图显示']='lcmap';
$CardShowMod['统计报表']='tjbb';
$CardShowMod['显示消息']='xiaoxi';
$CardShowMod['显示任务']='task';
$CardShowMod['显示上、下一条']='prinxt';
$CardShowMod['操作面板显示']='panel';
$CardShowMod['考核列表']='kaohebiao';
$CardShowMod['公文流程']='gwlc';

/*$CardShowMod['']='';
$CardShowMod['']='';
$CardShowMod['']='';
$CardShowMod['']='';
$CardShowMod['']='';
$CardShowMod['']='';
$CardShowMod['']='';
*/
//---------------------CardList使用的模块列表--------------------------------
$cardlist_default_setup='{|list_detail|baselist|listsearch}={0{0|{0}|1|{0}|1|{0}|1}0}';
//规范:由于英文名称使用文件名,因此要求一律小写
$CardListMod['主界面']='list_detail';
$CardListMod['标准列表']='baselist';
$CardListMod['列表搜索']='listsearch';
$CardListMod['项目配置数据库单项列表']='pzslist';
$CardListMod['项目配置数据库列表']='pzlist';
$CardListMod['项目配置选择']='pzsel';
$CardListMod['薪资专用项目配置选择']='pzxzsel';
$CardListMod['考核专用项目配置选择']='pzkpsel';
$CardListMod['薪资专用']='xinzi';
$CardListMod['简单列表']='simplelist';
$CardListMod['树形列表']='treelist';
//---------------------------- 资料库中设置“部门”和“个人”目录 --------------------------------
$FileManagerSetup["root"]["原始拥有者"]=",Admin,[系统管理员]";
$FileManagerSetup["root"]["原始读权限"]=",(全部人员)";
$FileManagerSetup["root"]["原始写权限"]=",{行政部}";

$FileManagerSetup[0]["文件夹"]="{#部门}";
//$FileManagerSetup[0]["原始读权限"]=",(全部人员)";
$FileManagerSetup[0]["原始拥有者"]="";
$FileManagerSetup[0]["原始读权限"]=",(全部人员)";
$FileManagerSetup[0]["原始写权限"]="";
$FileManagerSetup[0]["菜单设置"]="部门目录";

$FileManagerSetup[1]["文件夹"]="{#部门}/共享";
$FileManagerSetup[1]["原始拥有者"]=",{{#部门}}";
$FileManagerSetup[1]["原始读权限"]=",(全部人员)";
$FileManagerSetup[1]["原始写权限"]="";
$FileManagerSetup[1]["菜单设置"]="";//设置为空时,菜单设置时就没有这一项

$FileManagerSetup[2]["文件夹"]="{#部门}/私有";
$FileManagerSetup[2]["原始拥有者"]=",{{#部门}}";
$FileManagerSetup[2]["原始读权限"]="";
$FileManagerSetup[2]["原始写权限"]="";
$FileManagerSetup[2]["菜单设置"]="";//设置为空时,菜单设置时就没有这一项

$FileManagerSetup[3]["文件夹"]="{#部门}/{#员工编号}{#姓名}";
$FileManagerSetup[3]["原始拥有者"]="";
$FileManagerSetup[3]["原始读权限"]=",(全部人员)";
//$FileManagerSetup[3]["原始写权限"]=",{#员工编号}";
$FileManagerSetup[3]["原始写权限"]="";
$FileManagerSetup[3]["菜单设置"]="个人目录";

$FileManagerSetup[4]["文件夹"]="{#部门}/{#员工编号}{#姓名}/共享";
//$FileManagerSetup[4]["原始读权限"]=",(全部人员)";
$FileManagerSetup[4]["原始拥有者"]=",{#姓名}";
$FileManagerSetup[4]["原始读权限"]=",(全部人员)";
$FileManagerSetup[4]["原始写权限"]="";
$FileManagerSetup[4]["菜单设置"]="";//设置为空时,菜单设置时就没有这一项

$FileManagerSetup[5]["文件夹"]="{#部门}/{#员工编号}{#姓名}/私有";
//$FileManagerSetup[5]["原始读权限"]=",(全部人员)";
$FileManagerSetup[5]["原始拥有者"]=",{#姓名}";
$FileManagerSetup[5]["原始读权限"]="";
$FileManagerSetup[5]["原始写权限"]="";
$FileManagerSetup[5]["菜单设置"]="";//设置为空时,菜单设置时就没有这一项

$FileManagerSetup[6]["文件夹"]="公共档案管理";
$FileManagerSetup[6]["原始拥有者"]=",{行政部}";
$FileManagerSetup[6]["原始读权限"]=",(全部人员)";
$FileManagerSetup[6]["原始写权限"]="";
$FileManagerSetup[6]["菜单设置"]="公共档案管理";//设置为空时,菜单设置时就没有这一项
//---------------------用于统计报表(add by jollier 2002-11-11)-------------------------
$FUNC_NAME['BEGINDB']='设置循环体';
$FUNC_NAME['GF']='取字段值';
$FUNC_NAME['SUMT']='字段求和';
$FUNC_NAME['AVR']='字段平均值';
$FUNC_NAME['MAX']='字段最大值';
$FUNC_NAME['MIN']='字段最小值';
$FUNC_NAME['CONT']='字段计数';
$FUNC_NAME['SUMA']='地址求和';
$FUNC_NAME['CV']='系统常量';
$FUNC_NAME['CAL']='A运算';
$FUNC_NAME['IF']='条件判断';
$FUNC_NAME['NO']='序号';

//-------------------------------数据库基本属性-----------------------------------
$DB_BASE_PROPERTIES["启用数据库项目配置模式"]="0";$DB_BASE_PROPERTIES_SM["启用数据库项目配置模式"]="可以根据数据的不同类型自由设置预先定义字段的名称(0-不启用 1-启用)";
$DB_BASE_PROPERTIES["项目配置_调整描述"]="";$DB_BASE_PROPERTIES_SM["项目配置_调整描述"]="本描述主要出现在数据库项目配置模式下的分类显示的页面,用于调整该分类显示的标题";
$DB_BASE_PROPERTIES["数据统计"]="";$DB_BASE_PROPERTIES_SM["数据统计"]="设置分类数据的统计接口";
?>

newquery_inc.php3


<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/

$ga_cardsfields = array( );
$ga_cardstables = array( );
if ( $DBTYPE == "" )
{
$DBTYPE = "mysql";
}
include_once( "common.php" );
if ( $DBTYPE == "mysql" )
{
include_once( "db_mysql_inc.php3" );
}
else if ( $DBTYPE == "mssql" )
{
include_once( "db_mssql_inc.php3" );
}
else
{
exit( "没有找到文件!" );
}
class newquery extends db_sql
{

function newquery( $adb, $ahost = "localhost", $auser = "root", $apasswd = "" )
{
$this->Host = $ahost;
$this->Database = $adb;
$this->User = $auser;
$this->Password = $apasswd;
$this->g_cardkind = "";
$this->connect( );
}

function gettableinfo1( $table )
{
global $ga_cardstables;
global $ga_cardsfields;
if ( $ga_cardstables[$table] != "" )
{
return;
}
$this->query( "select id,cardtable from t_cards where cardinfo='{$table}' and delflag=0" );
if ( $this->next_record( ) )
{
$tableid = $this->f( "id" );
$ga_cardstables[$table] = $this->f( "cardtable" );
$this->query( "select field,fieldname from t_cardinfo where cardkind={$tableid}" );
while ( $this->next_record( ) )
{
$ga_cardsfields[$table][$this->f( "fieldname" )] = $this->f( "field" );
}
}
}

function getctable( $table )
{
$ret = $table;
$this->query( "select * from t_cards where cardtable='{$table}' and delflag=0" );
if ( $this->next_record( ) )
{
$ret = $this->f( "cardinfo" );
}
return $ret;
}

function gettable( $sql )
{
$table = "";
$sql = trim( $sql );
$a = strpos( $sql, " " );
if ( $a == 0 )
{
echo "SQL语句分析错误:{$sql}";
exit( );
}
$key = strtoupper( substr( $sql, 0, $a ) );
if ( $key == "SELECT" | $key == "DELETE" && preg_match( "@(.*)from (.*)@i", $sql, $reg ) )
{
$str = $reg[2];
if ( preg_match( "@(.*)where.*@i", $str, $reg ) )
{
$table = $reg[1];
}
else if ( preg_match( "@(.*)group.*by.*@i", $str, $reg ) )
{
$table = $reg[1];
}
else if ( preg_match( "@(.*)order.*by.*@i", $str, $reg ) )
{
$table = $reg[1];
}
else if ( preg_match( "@(.*)having.*@i", $str, $reg ) )
{
$table = $reg[1];
}
else if ( preg_match( "@(.*)limit.*@i", $str, $reg ) )
{
$table = $reg[1];
}
else
{
$table = $str;
}
}
if ( $key == "UPDATE" && preg_match( "@.*update(.*)set.*@i", $sql, $reg ) )
{
$table = $reg[1];
}
if ( $key == "INSERT" && preg_match( "@.*insert(.*)values.*@i", $sql, $reg ) )
{
$str = $reg[1];
if ( preg_match( "@.*into(.*)@i", $str, $reg ) )
{
$str = $reg[1];
}
if ( preg_match( "@(.*)\\(@i", $str, $reg ) )
{
$str = $reg[1];
}
$table = $str;
}
if ( $table != "" )
{
$this->query( "select id,cardinfo from t_cards where cardtable='{$table}' and delflag=0" );
if ( $this->next_record( ) )
{
$table = $this->f( "cardinfo" );
}
}
return $table;
}

function changequerystring( $Query_String )
{
global $ga_cardsfields;
global $ga_cardstables;
$str = $Query_String;
$str = str_replace( "\\'", "~^@1#", $str );
$str = str_replace( "''", "~^@2#", $str );
$tmp = explode( "'", $str );
$str = "";
while ( list( $key, $val ) = each( $tmp ) )
{
if ( $key % 2 == 0 )
{
$str .= $val;
}
}
$table = "";
while ( preg_match( "@(.*){([^}]*)}(.*)@i", $str, $reg ) )
{
$str = $reg[1].$reg[3];
$table = $reg[2];
$table1 = ( integer )$table;
if ( 0 < $table1 )
{
$table = "t_cardcontent{$table}";
$table = $this->getctable( $table );
}
$table1 = $reg[2];
$this->gettableinfo1( $table );
}
if ( $table == "" )
{
$table = $this->gettable( $str );
$table = $this->getctable( $table );
if ( $table != "" )
{
$this->gettableinfo1( $table );
}
}
$this->g_cardkind = $table;
$str = "";
reset( $tmp );
while ( list( $key, $val ) = each( $tmp ) )
{
if ( $str != "" )
{
$str .= "'";
}
if ( $key % 2 == 0 )
{
$ss = $val;
while ( preg_match( "@(.*)\\[([^\\]]*)\\](.*)@i", $ss, $reg ) )
{
$ss = $reg[1].$reg[3];
$cfield = $reg[2];
$efield = $ga_cardsfields[$table][$cfield];
if ( $efield != "" )
{
$val = str_replace( "[{$cfield}]", $efield, $val );
}
}
if ( $table1 != "" )
{
$val = str_replace( "{".$table1."}", $ga_cardstables[$table], $val );
}
$str .= $val;
}
else
{
$str .= $val;
}
}
$str = str_replace( "~^@1#", "\\'", $str );
$str = str_replace( "~^@2#", "''", $str );
return $str;
}

function query( $Query_String )
{
global $ga_cardsfields;
global $ga_cardstables;
if ( $Query_String == "" )
{
return 0;
}
if ( !$this->connect( ) )
{
return 0;
}
if ( $this->Query_ID )
{
$this->free( );
}
if ( $this->Debug )
{
printf( "Debug: CN_query = %s<br>\n", $Query_String );
}
$atmp1 = explode( "[", $Query_String );
$atmp2 = explode( "{", $Query_String );
if ( 1 < count( $atmp1 ) | 1 < count( $atmp2 ) )
{
$Query_String = $this->changequerystring( $Query_String );
}
$Query_String = $this->clsql( $Query_String );
if ( $this->Debug )
{
printf( "Debug: N_query = %s<br>\n", $Query_String );
}
$this->Query_ID = $this->myquery( $Query_String, $this->Link_ID );
if ( !$this->Query_ID )
{
$this->halt( "Invalid SQL: ".$Query_String );
}
return $this->Query_ID;
}

function f( $Name )
{
global $ga_cardsfields;
$Name = trim( $Name );
$len = strlen( $Name );
if ( 3 <= $len )
{
$tmp1 = substr( $Name, 0, 1 );
$tmp2 = substr( $Name, 1, $len - 2 );
$tmp3 = substr( $Name, -1 );
if ( $tmp1 == "[" & $tmp3 == "]" )
{
if ( $ga_cardsfields[$this->g_cardkind][$tmp2] != "" )
{
$Name = $ga_cardsfields[$this->g_cardkind][$tmp2];
return $this->Record[$Name];
}
else
{
return $this->Record[$Name];
}
}
else
{
return $this->Record[$Name];
}
}
else
{
return $this->Record[$Name];
}
}

}

?>

oa_config.php


<?
/************************************************************************************************
* OA 用户配置文件
* 说明:
* 该文件是一个用户配置文件,大多数的配置是通过改
* 变配置参数来实现的,可用于用户对系统的优化或是
* 个性化的配置
************************************************************************************************/

/*************************************系统登录配置**********************************************/
$OaSystemSetup["登录另开窗口"] = false;
$OaSystemSetup["带网卡验证登录"] = false; //设置客户端IE是否带网卡验证登录
$OaSystemSetup["指纹系统"] = true; //设置客户端IE是否带指纹验证登录
$OaSystemSetup["登录不记录用户信息"]= true; //登录的时候不将用户的信息记录到 Session
//中的数组 gSemployee 中

/************************************系统优化配置***********************************************/
$OaSystemSetup["公司名称"] = "东风汽车公司离退休人员管理处"; //设置主页面左上角的公司名称
$OaSystemSetup["系统标题栏内容"] = "东风汽车离退休OA"; //IE标题栏显示的内容
$OaSystemSetup["midi"] = true; //接收消息是否发出声音
$OaSystemSetup["工具栏刷新时间"] = 300; //新消息刷新频率(此值如太小将增大服务器负载)
$OaSystemSetup["标题栏颜色"] = "#FFCC66"; //显示模式时各个标题栏的颜色设置
$OaSystemSetup["用户密码加密"] = true; //用户密码在数据库中的显示方式
$OaSystemSetup["是否使用论坛"] = false;

$OaSystemSetup["允许被代理人登录恢复"] = false;
$OaSystemSetup["上级设置下级代理"] = true;
$OaSystemSetup["仅自己设置代理"] = false;
$OaSystemSetup["超级用户任意设置代理"] = false;
//-----内部通讯录 显示字段设置(数组值的定义:1:显示;0:不显示;后面是字段所在数据库的名字)
$SHOW_FIELD['姓名'] = '1,用户库';
$SHOW_FIELD['曾用名'] = '0,人事数据库';
$SHOW_FIELD['手机号码'] = '1,人事数据库';
$SHOW_FIELD['家庭电话'] = '0,人事数据库';
$SHOW_FIELD['Email'] = '1,人事数据库';
$SHOW_FIELD['分机'] = '1,用户库';

//*************设置选人方式*************
// 0: 普通方式
// 1: 按拼音字头排序
// 2: 组织结构树方式
// 3: 部门结构树方式
//************************************
$OaSystemSetup["选人方式"] = 2;

//-----设置消息颜色
$NEW_MESSAGECOLOR[0] = '#000000'; //知会
$NEW_MESSAGECOLOR[1] = 'blue'; //催办
$NEW_MESSAGECOLOR[2] = '#990000';
$NEW_MESSAGECOLOR[3] = 'green'; //任务
$NEW_MESSAGECOLOR[4] = '#996600'; //代理

//-----设置在线会议类型及颜色
$MEET_COLOR_DEFAULT = "#666666"; //没有类型的颜色
$MEET_TYPE_DEFAULT = "发言"; //默认选择的类型
$MEET_TYPE["发言"] = '#555555';
$MEET_TYPE["结论"] = '#339933';
$MEET_TYPE["建议"] = '#3366FF';

$SHOWDAYS = 30; //显示最近几天的通知公告
$LCSETUP = 20; //可设置的流程的步骤数

//-----设置旷工检测和上下班时间
$OaSystemSetup["检测旷工"] = false; //生成考勤日报的时候,是否处理没有签到/也不是请假,出差的员工
$WORK_TIME = "09:00:00"; //上班时间
$WORKOFF_TIME = "17:30:00"; //下班时间

//------------------------------数据表List颜色显示设置---------------------------
$OaSystemSetup["列表行颜色"][1]="#ffffff";
$OaSystemSetup["列表行颜色"][0]="#f3f3f3";

/****************************************系统功能模块配置***************************************/
$OaSystemSetup["VDP数据同步"] = false; //用于VDP的数据同步

$OaSystemSetup["是否允许编辑Word"] = true; //用于资料库中是否允许编辑Word
$OaSystemSetup["资料库显示文件备注"] = true;
$OaSystemSetup["资料库允许文件锁定"] = true;
//-----设置word在线编辑可以处理的文件类型
$WordOCX['doc'] = 1;
$WordOCX['dot'] = 1;
$WordOCX['rtf'] = 1;

$OaSystemSetup["短消息"] = true; //短消息系统开关
$OaSystemSetup["短消息资费"] = '0.10';

$OaSystemSetup["档案管理"] = false; //使用档案管理模块

$OaSystemSetup["流程执行时间"] = false;

?>

template_inc.php3


<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/

class template
{

public $classname = "Template";
public $mbname = "";
public $printmbname = "";
public $debug = FALSE;
public $bLoaded = FALSE;
public $varBlock = array( );
public $strVarDefine = "";
public $root = "";
public $varkeys = array( );
public $varvals = array( );
public $unknowns = "remove";
public $halt_on_error = "yes";
public $tmz = 0;
public $tmp_key = "";
public $tmp_reg = 0;
public $mb_print_type = 0;
public $last_error = "";

public function template( $root = ".", $unknowns = "remove", $halt_error = "yes" )
{
$this->setroot( $root );
$this->setunknowns( $unknowns );
$this->sethaltonerror( $halt_error );
}

public function setroot( $root )
{
if ( !is_dir( $root ) )
{
$this->halt( "set_root: {$root} is not a directory." );
return FALSE;
}
$this->root = $root;
return TRUE;
}

public function setunknowns( $unknowns = "keep" )
{
$this->unknowns = $unknowns;
}

public function sethaltonerror( $halt_error = "yes" )
{
$this->halt_on_error = $halt_error;
}

public function openfile( $filename )
{
if ( $filename == "" )
{
$this->halt( "OpenFile: filename is empty." );
return FALSE;
}
$this->bLoaded = FALSE;
if ( !$this->loadfile( $this->getfilename( $filename ) ) )
{
$this->halt( "OpenFile: unable to load {$filename}." );
return FALSE;
}
$reg = "/<!--\\s+TemplateVarDefine=([^\\s]*)\\s+-->/sm";
preg_match_all( $reg, $this->strTemplate, $Result );
$this->strVarDefine = $Result[1][0];
if ( $this->debug )
{
print "VarDefine = {$this->strVarDefine}<br>\n";
}
}

public function processblock( $BlockName )
{
if ( !$this->bLoaded )
{
$this->halt( "ProcessBlock: template not loaded." );
return FALSE;
}
if ( $this->debug )
{
print "Before ProcessBlock, template = {$this->strTemplate}<br>\n";
}
$reg = "/<!--\\s+BEGIN {$BlockName}\\s+-->(.*)\n\\s*<!--\\s+END {$BlockName}\\s+-->/sm";
preg_match_all( $reg, $this->strTemplate, $Result );
$this->setvar( $BlockName, $Result[1][0] );
$this->varBlock[$BlockName] = "TmpBlockByHance_".$BlockName;
$this->strTemplate = preg_replace( $reg, $this->strVarDefine."{".$this->varBlock[$BlockName]."}", $this->strTemplate );
if ( $this->debug )
{
print "After ProcessBlock, template = {$this->strTemplate}<br>\n";
}
}

public function setvar( $varname, $value = "" )
{
if ( !is_array( $varname ) )
{
if ( !empty( $varname ) && $this->debug )
{
print "scalar: set *{$varname}* to *{$value}*<br>\n";
}
$this->varkeys[$varname] = "/".$this->getvarname( $varname )."/";
$this->varvals[$varname] = $value;
}
else
{
reset( $varname );
while ( list( $k, $v ) = each( $varname ) )
{
if ( !empty( $k ) && $this->debug )
{
print "array: set *{$k}* to *{$v}*<br>\n";
}
$this->varkeys[$k] = "/".$this->getvarname( $k )."/";
$this->varvals[$k] = $v;
}
}
}

public function parseblock( $handle, $append = TRUE )
{
if ( !is_array( $handle ) )
{
$target = $this->varBlock[$handle];
$str = $this->subst( $handle );
if ( $this->debug )
{
print "{$handle} = {$str}<br>\n";
}
if ( $append )
{
$this->setvar( $target, $this->getvarvalue( $target ).$str );
}
else
{
$this->setvar( $target, $str );
}
}
else
{
reset( $handle );
while ( list( $i, $h ) = each( $handle ) )
{
$str = $this->subst( $h );
$target = $this->varBlock[$i];
if ( $append )
{
$this->setvar( $target, $this->getvarvalue( $target ).$str );
}
else
{
$this->setvar( $target, $str );
}
}
}
}

public function output( $flag = "" )
{
global $PATH_INFO;
global $QUERY_STRING;
global $gYuYanU;
global $NbwUserLanguage;
global $REQUEST_URI;
global $printinterface;
global $printcrc;
global $gSloadingman;
global $OaSystemSetup;
if ( count( $this->varkeys ) )
{
$str = @preg_replace( $this->varkeys, $this->varvals, $this->strTemplate );
}
else
{
$str = $this->strTemplate;
}
if ( 0 < strpos( $this->TempFilename, "detail_" ) && $this->settempbuflong( ) == 3 )
{
echo "发现本模板已被修改,激活码校验失败,请重新激活";
exit( );
}
$OATitleName = $OaSystemSetup['系统标题栏内容'];
if ( $OATitleName == "" )
{
$OATitleName = "奥码OA";
}
$str = str_replace( "天地OA", $OATitleName, $str );
$str = str_replace( "奥码OA", $OATitleName, $str );
print $this->finish( $str );
include_once( "common.php" );
$path = "/template/".$gYuYanU[$NbwUserLanguage];
print "\n<script>\n";
print "if( (window.parent.topframe) && (window.parent.topframe.document.frmhelp) && (window.parent.topframe.document.frmhelp.path) ){\n";
print "\twindow.parent.topframe.document.frmhelp.path.value='".base64_encode( $path.$PATH_INFO )."';\n";
if ( $PATH_INFO != "/menu/top.php" && $PATH_INFO != "/menu/left.php" && $PATH_INFO != "/menu/middle.php" && $PATH_INFO != "/menu/bottom.php" )
{
print "\twindow.parent.topframe.document.frmhelp.link.value='".b_encode( $PATH_INFO."?".$QUERY_STRING )."';\n";
if ( file_exists( $this->printmbname ) )
{
print "\twindow.parent.topframe.document.frmhelp.haveprinttemplate.value='1';\n";
}
else
{
print "\twindow.parent.topframe.document.frmhelp.haveprinttemplate.value='0';\n";
}
if ( substr( $QUERY_STRING, 0, 1 ) == "?" )
{
$QUERY_STRING = substr( $QUERY_STRING, 1 );
}
print "\twindow.parent.topframe.document.frmhelp.requesturl.value='".$PATH_INFO."?".$QUERY_STRING."';\n";
print "}\n";
print "</script>\n";
$printinterface .= "";
if ( $printinterface != "" & $printcrc == "" )
{
if ( $this->mb_print_type < 2 )
{
print "<script>window.print();</script>\n";
}
if ( $this->mb_print_type == 2 )
{
$this->printpagetotemp( );
print "<script>location.href='/print_tmp/".$gSloadingman['ygbh'].".doc';</script>";
}
}
}
else
{
print "}\n";
print "</script>";
}
}

public function getoutput( )
{
if ( count( $this->varkeys ) )
{
$str = @preg_replace( $this->varkeys, $this->varvals, $this->strTemplate );
}
else
{
$str = $this->strTemplate;
}
return $this->finish( $str );
}

public function printpagetotemp( )
{
global $gSloadingman;
global $PHPSESSID;
global $SERVER_ADDR;
global $REQUEST_URI;
global $VdpFileRoot;
global $_SESSION;
$tt = arraytotxt( $_SESSION );
$path = $VdpFileRoot."/print_tmp/prn_".$PHPSESSID.".tmp";
vdpwritefile( $tt, $path );
$printcrc = b_encode( $PHPSESSID );
$url = "http://".$SERVER_ADDR."/".$REQUEST_URI;
if ( strpos( $url, "?" ) == 0 )
{
$url .= "?";
}
else
{
$url .= "&";
}
$url .= "printcrc=".$printcrc;
$file = fopen( $url, "r" );
if ( !$file )
{
echo "数据读取错误!";
exit( );
}
$line = "";
while ( !feof( $file ) )
{
$line .= fgets( $file, 1024 );
}
fclose( $file );
$path = $VdpFileRoot."/print_tmp/".$gSloadingman['ygbh'].".doc";
vdpwritefile( $line, $path );
}

public function getvarvalue( $varname )
{
if ( !is_array( $varname ) )
{
return $this->varvals[$varname];
}
else
{
reset( $varname );
while ( list( $k, $v ) = each( $varname ) )
{
$result[$k] = $this->varvals[$k];
}
return $result;
}
}

public function getfilename( $filename )
{
global $printinterface;
if ( substr( $filename, 0, 1 ) != "/" & substr( $filename, 1, 1 ) != ":" )
{
$filename = $this->root."/".$filename;
}
if ( !file_exists( $filename ) )
{
$this->halt( "filename: file {$filename} does not exist." );
}
if ( $printinterface != "" )
{
$filename1 = str_replace( ".html", "_print.html", $filename );
$filename2 = str_replace( ".html", "_excel.html", $filename );
$this->mb_print_type = 0;
if ( file_exists( $filename1 ) )
{
$filename = $filename1;
$this->mb_print_type = 1;
}
if ( file_exists( $filename2 ) )
{
$filename = $filename2;
$this->mb_print_type = 2;
}
}
$this->TempFilename = $filename;
return $filename;
}

public function getvarname( $varname )
{
return preg_quote( $this->strVarDefine."{".$varname."}" );
}

public function finish( $str )
{
switch ( $this->unknowns )
{
case "keep" :
break;
case "remove" :
$str = preg_replace( "/{$this->strVarDefine}{[^ \t\r\n}]+\\}/", "", $str );
break;
case "comment" :
$str = preg_replace( "/{$this->strVarDefine}{([^ \t\r\n}]+)\\}/", "<!-- Template : Variable \\1 undefined -->", $str );
break;
}
return $str;
}

public function subst( $handle )
{
if ( !$this->bLoaded )
{
$this->halt( "subst: template not loaded." );
return FALSE;
}
$str = $this->getvarvalue( $handle );
$str = preg_replace( $this->varkeys, $this->varvals, $str );
return $str;
}

public function loadfile( $filename )
{
if ( $this->bLoaded )
{
return TRUE;
}
$this->strTemplate = implode( "", @file( $filename ) );
if ( empty( $this->strTemplate ) )
{
$this->halt( "loadfile: While loading {$handle}, {$filename} does not exist or is empty." );
return FALSE;
}
$this->mbname = $filename;
$this->printmbname = str_replace( ".html", "_print.html", $filename );
$this->strTemplate = $this->tempd( $this->strTemplate );
$this->bLoaded = TRUE;
return TRUE;
}

public function halt( $msg )
{
$this->last_error = $msg;
if ( $this->halt_on_error != "no" )
{
$this->haltmsg( $msg );
}
if ( $this->halt_on_error == "yes" )
{
exit( "<b>Halted.</b>" );
}
return FALSE;
}

public function haltmsg( $msg )
{
printf( "<b>Template Error:</b> %s<br>\n", $msg );
}

public function k2a( $k )
{
$r_js = array( );
$p = str_repeat( $k, 8 );
$b = strlen( $p );
$a = 0;
for ( ; $a < $b; ++$a )
{
$mb[$p[$a]] += 0;
$c = $mb[$p[$a]] + 1000;
$c = $p[$a].substr( $c, 1 );
$r_js[$a] = $c;
$mb[$p[$a]] += 1;
}
return $r_js;
}

public function settempbuf( )
{
global $Temp__Linux_PPL;
return $Temp__Linux_PPL;
}

public function settempbuflong( )
{
global $rkey;
$RR = strtoupper( substr( $rkey, 24, 8 ) );
if ( $RR == "00000000" )
{
return 0;
}
$i = 0;
for ( ; $i < 8; ++$i )
{
$RR[$i] = chr( ord( $RR[$i] ) - 17 - $i * 2 );
}
$LL = $RR[0].$RR[1].$RR[2].$RR[3]."-".$RR[4].$RR[5]."-".$RR[6].$RR[7];
$LL = strtotime( $LL ) - 432000;
if ( $this->settempbuf( ) == 0 )
{
return 3;
}
if ( time( ) < $LL )
{
return 1;
}
return 2;
}

public function tempd( $s )
{
global $gSkey;
global $sn;
global $rkey;
global $skey;
global $Temp__Linux_PPL;
if ( substr( $s, 0, 4 ) != "#TMZ" )
{
}
else
{
$k1 = substr( $s, 8, 32 );
$this->tmp_key = $k1;
$r_js = $this->k2a( $k1 );
$s = substr( $s, 121 );
$pa = explode( "#", $s );
$p = array( );
$a = 0;
for ( ; $a < count( $pa ); ++$a )
{
$p[$r_js[$a]] = "";
}
ksort( $p );
reset( $p );
$a = 0;
while ( list( $key, $val ) = each( $p ) )
{
$p[$key] = $pa[$a];
++$a;
}
$s = "";
$a = 0;
for ( ; $a < count( $pa ); ++$a )
{
$s .= $p[$r_js[$a]];
}
$s = strrev( $s );
$s = base64_decode( $s );
$this->tmz = 1;
}
if ( $gSkey[0] != "" && md5( $gSkey[0].date( "Y-m" ) ) != $gSkey[1] && date( "j" ) != "1" )
{
echo "系统内部校验失败,为了您的数据安全,请重新登录!";
exit( );
}
$ma = $gSkey[2];
$ma = split( "\\[\\]", $ma );
$ma = base64_decode( $ma[2] );
$skey = strtolower( $skey );
$sn = strtolower( $sn );
$rkey = strtolower( $rkey );
$mkey = strtolower( substr( $gSkey[0], 8, 16 ) );
$r1 = md5( $mkey );
$r1 = base64_encode( $r1.$sn );
$r1 = md5( $r1 );
$r2 = base64_encode( $mkey.$sn );
$r2 = md5( $r2 );
$r3 = md5( md5( base64_encode( $mkey ) ).md5( base64_encode( $sn ) ) );
$rr = "01234567890123456789012345678901";
$a = 0;
for ( ; $a < 32; ++$a )
{
$b1 = hexdec( $r1[$a] );
$b2 = hexdec( $r2[$a] );
$b3 = hexdec( $r3[$a] );
$b = dechex( ( $b1 + $b2 + $b3 ) % 16 );
$rr[$a] = $b;
}
$rr = strtolower( substr( $rr, 8, 16 ) );
$hhbz = 0;
$kk = $k1;
if ( $k1 == "" )
{
$kk = $rkey;
}
$LL = substr( $kk, 0, 8 );
$RR = substr( $kk, 8, 24 );
if ( $LL != substr( md5( $RR ), 0, 8 ) )
{
$hhbz = 1;
}
if ( substr( $rkey, 8, 16 ) != $rr )
{
$hhbz = 1;
}
$LL = substr( $skey, 24, 8 );
$RR = strtolower( $LL[0].$LL[1]."-".$LL[2].$LL[3]."-".$LL[4].$LL[5]."-".$LL[6].$LL[7] );
if ( strpos( strtolower( $ma ), $RR ) == 0 )
{
$hhbz = 1;
}
$RR = strtoupper( substr( $kk, 24, 8 ) );
$i = 0;
for ( ; $i < 8; ++$i )
{
$RR[$i] = chr( ord( $RR[$i] ) - 17 - $i * 2 );
}
$LL = $RR[0].$RR[1].$RR[2].$RR[3]."-".$RR[4].$RR[5]."-".$RR[6].$RR[7];
if ( $LL <= date( "Y-m-d" ) )
{
$hhbz = 1;
}
$Temp__Linux_PPL = 1 - $hhbz;
if ( $hhbz == 0 )
{
$this->reg = 1;
}
else
{
$this->reg = 0;
}
return $s;
}

}

include_once( "func.php" );
include_once( "gb2utf.php" );
?>

common.php


<?
$DBTYPE='mysql';
$OA_BasePath="d:/oa/pro"; //系统目录
$MYSQL_DB_BASE="d:/oa/pro/mysql/data";//莼目录
$OA_FilePath="d:/oa/file"; //募目录

$VBB_DbMHost="localhost";//菘址
$VBB_DbMUser="root";//菘撕
$VBB_DbMPass='';//使
$VBB_DbUseDatabase='vbb_db';//菘

//---------------- linux 使没转----------
if (PHP_OS=="WINNT")
{
}
if (PHP_OS=="Linux")
{ if ($REDIRECT_URL=="") $REDIRECT_URL=$SCRIPT_NAME;
if ($PATH_INFO=="") $PATH_INFO=$SCRIPT_NAME;
if ($PATH_TRANSLATED=="") $PATH_TRANSLATED=$SCRIPT_FILENAME;
}

//---------PHP5姹---------- add by york 2009-4-23
if(PHP_VERSION>=5)
{ if ($REDIRECT_URL=="") $REDIRECT_URL=$SCRIPT_NAME;
if ($PATH_INFO=="") $PATH_INFO=$SCRIPT_NAME;
if ($PATH_TRANSLATED=="") $PATH_TRANSLATED=$SCRIPT_FILENAME;
}
$VdpSystemRoot=$OA_BasePath."/apache/htdocs/"; //系统幕目录
$DbMHost="127.0.0.1"; //菘址
$DbMUser="root"; //菘撕
$DbMPass="123456"; //使
$DbUseDatabase="nbw1";

//------------------SMS-----------------------------
$SMSSERVER="localhost";
$SMSUSER="Admin";
$SMSPASS="12345";
$SMSPORT="9802";
//-------------------------------------------------------

$cfgBackupDir=$OA_FilePath."/backup"; //系统目录
$LogRootDir=$OA_FilePath."/log"; //系统志目录
$cfgMaxMailRecord="100000"; //没娲⑹悸
$VdpFileRoot=$OA_FilePath; //系统募目录系统为/file/xx
//为404转兀为$VdpFileRoot/file/xx贸募拇位谩
$VdpZlkRoot=$OA_FilePath; //峡募拇目录
$VdpDocRoot=$OA_FilePath.'/'; //牡
$OABigFileRoot=$OA_FilePath; //募洗目录
$tempdir="/document/temp/"; //时目录
$OABigFileTempRoot=$OABigFileRoot.$tempdir;//募洗时目录
$cfgTmpDir="$VdpFileRoot/tmp"; //时目录
$FuJianPic=$OA_FilePath."/";//图片娲⑽
if ($WINDIR!="")
{
//统图路
DEFINE("TTF_DIR","$WINDIR/fonts/");
}
$HELPDOC=$VdpSystemRoot."vbb";//指募路
//OA姹
$OASystemVersion="Version_20040421";

/*-*/
$skey="gwya4421d41d8cd9cd5590de20524153";
$sn="eg0270000";
$rkey="52c80969d131d91574e6f082ccfpjmpp";
?>