求教

ysbxxh 2016-05-11 11:37:36
附上两段代码file_type_add.php与mod_file_type_add.php,百思不得其解:get_oa_member_public(2,"keyuser","","+选择审批人员",60,4)这个函数从哪里来的,又调用哪里的?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="themes01/default/clientPublic.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/codeMgr.css" rel="stylesheet" type="text/css"/>
<link href="themes01/default/tabSwitch.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="themes01/default/pstyle.css">
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
<title>Office 515158 2011 OA办公系统</title>

</head>
<body>
<div id="Holder">
<div id="MainPage">



<div id="Subnav">

<ul>
<?php
//定义标题
$nums=40;
$sqlnumeid=6;
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."menu where fatherid='".$sqlnumeid."' and menutype='0' ORDER BY menunum Asc");
while ($row = $db->fetch_array($query)) {
?>
<li><a href="<?=$row[menuurl]?>" <? if($nums==$row[menuid]){?> id="Subnavb"<? }?>><?=$row[menuname]?></a></li>
<?php
}
?>


</ul>
</div>
<script Language="JavaScript">
function CheckForm()
{
if(document.save.title.value=="")
{ alert("栏目名称不能为空!");
document.save.title.focus();
return (false);
}
if(document.save.keyuser.value=="")
{ alert("档案审批人员不能为空!");
document.save.keyuser.focus();
return (false);
}
return true;
}
function sendForm()
{
if(CheckForm())
document.save.submit();
}
</script>
<form name="save" method="post" action="?ac=file_type_add&do=save&fileurl=file">
<input type="hidden" name="savetype" value="add" />
<table class="TableTop" width="90%">
<tr>
<td class="left"></td>
<td class="center">新建档案类别</td>
<td class="right"></td>
</tr>
</table>
<table class="TableBlock no-top-border" width="90%">
<tr>
<td nowrap class="TableData" width="15%"> 栏目名称:<? get_user_add_help() ?></td>
<td class="TableData">
<input maxlength="88" class="BigInput" style="width: 264px;" type="text" name="title" id="title" />
</td>
</tr>
<tr>
<td nowrap class="TableData" width="15%"> 档案审批人员:<? get_user_add_help() ?></td>
<td class="TableData">
<?php
get_oa_member_public(2,"keyuser","","+选择审批人员",60,4)
?>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 选择上级栏目:</td>
<td class="TableData">
<select class="SelectStyle" name="father">
<option value="0" >顶级栏目</option>
<?php GET_FILE_PUBLIC_LIST()?>
</select>
</td>
</tr>



<tr align="center" class="TableControl">
<td colspan="2" nowrap height="35">

<input type="button" name="Submit" value="保存信息" class="BigButton" onclick="sendForm();">

</td>
</tr>
</table>
</form>
</div>
</div>


</body>
</html>

<?php
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
/*
[天生创想] (C)2008-2011 515158 Inc.
This is NOT a freeware, use is subject to license terms
URL:http://www.515158.com/
*/


get_config_keytable("file_type_Increase");
empty($do) && $do = 'list';
if ($do == 'list') {
include_once('template/file_type_add.php');

} elseif ($do == 'save') {
$savetype = getGP('savetype','P');
$title = getGP('title','P');
$father=getGP('father','P');
$keyuser=getGP('keyuser','P');
$file_type = array(
'title' => $title,
'father' => $father,
'keyuser' => $keyuser,
'date' => get_date('Y-m-d',PHP_TIME),
'uid' => $_USER->id
);
insert_db('file_type',$file_type);
$id=$db->insert_id();
$content=$title.get_inc_log(1).$father.get_inc_log(1).$keyuser;
$title='新增档案类别';
get_oa_log_dbadd($id,$content,$title,20,$_USER->id);
goto_page('admin.php?ac=file_type&fileurl=file');

}

//读取部门
function GET_FILE_PUBLIC_LIST($fatherid=0,$selid=0,$layer=0)
{


$str="";
global $db;
$query = $db->query("SELECT * FROM ".DB_TABLEPRE."file_type where father='$fatherid' ORDER BY id Asc ");

if(count($query)>0){
for($i=0;$i<$layer;$i++){

$str.="1";

}

while ($row = $db->fetch_array($query)) {
$selstr = $row['id'] == $selid ? 'selected="selected"' : '';

$htmlstr= '<option value="'.$row['id'].'" '.$selstr.'>'.$str.$row['title'].'</option>';

echo $htmlstr;

GET_FILE_PUBLIC_LIST($row['id'],$selid,$layer+1,$type);

}

}

return ;

}

?>
...全文
160 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
xfuyct 2016-05-17
  • 打赏
  • 举报
回复
看了下,类似还有get_user_add_help。 从理论上看这个php文件是被一个主文件调用。 PS:如果这个php文件单独可以运行的话,那么就是在环境中dll定义了这些类。
xuzuning 2016-05-17
  • 打赏
  • 举报
回复
get_oa_member_public 显然不是在你给出的代码中定义的 并且你给出的代码中也没有 include(require)函数的使用 显然你的代码是被其他程序文件 include 执行的 你可在 get_oa_member_public(2,"keyuser","","+选择审批人员",60,4) 之前 print_r(get_included_files()); 看一下都有哪些文件被加载 并且在这些文件中查找 function get_oa_member_public 字样
一起混吧 2016-05-17
  • 打赏
  • 举报
回复
搜索一下整个框架不就知道了
ysbxxh 2016-05-17
  • 打赏
  • 举报
回复
引用 1 楼 xfuyct 的回复:
看了下,类似还有get_user_add_help。 从理论上看这个php文件是被一个主文件调用。 PS:如果这个php文件单独可以运行的话,那么就是在环境中dll定义了这些类。
get_user_add_help是另外一个PHP文件吗?在环境中dll定义了这些类是什么意识?

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧