本文整理汇总了PHP中returntablefield函数的典型用法代码示例。如果您正苦于以下问题:PHP returntablefield函数的具体用法?PHP returntablefield怎么用?PHP returntablefield使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了returntablefield函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: customerbelong_add
function customerbelong_add($fields, $i)
{
$userid = returntablefield("customer", "ROWID", $fields['value']['ROWID'], "sysuser");
if (ifHasRoleUser($userid) || $userid == "") {
global $db;
print "<TR><TD class=TableData noWrap>查看权限:</TD><TD class=TableData noWrap>\n";
$sql = "select * from customerbelong";
if ($_SESSION['LOGIN_USER_PRIV'] == '3' || $fields['value']['datascope'] == '') {
$sql .= " where id>0";
}
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$check = '';
if ($fields['value']['datascope'] == '') {
$fields['value']['datascope'] = 2;
}
for ($j = 0; $j < sizeof($rs_a); $j++) {
if ($rs_a[$j]['id'] == $fields['value']['datascope']) {
$check = 'checked';
} else {
$check = '';
}
print "<input type='radio' name='datascope' id='datascope' value='" . $rs_a[$j]['id'] . "' " . $check . " " . $readonly . ">" . $rs_a[$j]['name'];
}
print "</td></tr>";
} else {
print "<input type='hidden' name='datascope' id='datascope' value='" . $fields['value']['datascope'] . "'>";
}
}
示例2: read_sms
function read_sms()
{
global $html_etc;
global $common_html;
global $sessionkey;
global $GLOBAL_SESSION;
global $SUNSHINE_USER_NAME_VAR;
global $SUNSHINE_USER_NICK_NAME_VAR;
global $db;
global $_GET;
global $POST;
global $GLOBAL_SESSION;
$USER_ID = $GLOBAL_SESSION[$SUNSHINE_USER_NAME_VAR];
$USER_NAME = $GLOBAL_SESSION[$SUNSHINE_USER_NICK_NAME_VAR];
$sql = "select * from sms where REMIND_FLAG=1 and TO_ID='{$USER_ID}' and delete_receive!=1 order by SEND_TIME DESC";
$rs = $db->execute($sql);
if ($rs->recordcount() <= 0) {
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=javascript:window.close()'>\n";
}
$SMS_ID = $rs->fields['SMS_ID'];
$FROM_ID = $rs->fields['FROM_ID'];
$SEND_TIME = $rs->fields['SEND_TIME'];
$CONTENT = $rs->fields['CONTENT'];
$FROM_NAME = returntablefield("user", "USER_NAME", $FROM_ID, "NICK_NAME");
$FROM_ID = $rs->fields['FROM_ID'];
require_once "../Enginee/lib/html/readsms.html";
}
示例3: fahuodanrefer_value
function fahuodanrefer_value($fieldvalue, $fields, $i)
{
$value = $fieldvalue;
$color = setColorByName($value);
$outtype = returntablefield("fahuodan", "billid", $fields['value'][$i]['billid'], "outtype");
if ($outtype == "销售出库") {
$billinfo = returntablefield("sellplanmain", "billid", $fieldvalue, "billtype,zhuti");
$billtype = $billinfo['billtype'];
$title = $billinfo['zhuti'];
if ($billtype == '1') {
$url = "sellcontract_newai.php";
} else {
if ($billtype == '2') {
$url = "sellplanmain_newai.php";
} else {
if ($billtype == '3') {
$url = "sellonemain_newai.php";
}
}
}
$fieldvalue = "<a style='color:{$color}' href='{$url}?" . base64_encode("action=view_default&billid=" . $fieldvalue) . "' target='_blank'>" . $title . "</a>";
} else {
if ($outtype == '返厂出库') {
$title = returntablefield("buyplanmain", "billid", $fieldvalue, "zhuti");
$fieldvalue = "<a style='color:{$color}' href='buyplanmain_newai.php?" . base64_encode("action=view_default&billid={$fieldvalue}") . "' target='_blank'>{$title}</a>";
}
}
return $fieldvalue;
}
示例4: CustomerKaiPiao_add
function CustomerKaiPiao_add($fields, $i)
{
global $db, $_SESSION, $common_html;
$notnull = trim($fields['null'][$i]['inputtype']);
$notnull == 'notnull' ? $notnulltext = $common_html['common_html']['mustinput'] : ($notnulltext = '');
$fieldname1 = $fields['name'][$i];
$fieldname2 = $fields['input'][$i][0];
$j = array_search($fieldname2, $fields['name'], true);
$notnull = trim($fields['null'][$j]['inputtype']);
$notnull == 'notnull' ? $notnulltext1 = $common_html['common_html']['mustinput'] : ($notnulltext1 = '');
$class = "SmallSelect";
print "<script language=javascript>\nvar xmlHttp1; \nfunction createxmlHttp1_buysellbill() {\n if (window.xmlHttp1Request) {\n xmlHttp1 = new xmlHttpRequest(); \n } else {\n xmlHttp1 = new ActiveXObject(\"Microsoft.xmlHttp\");\n }\n}\nfunction sendRequest(action,params) {\n createxmlHttp1_buysellbill(); \n xmlHttp1.onreadystatechange =function() {showCartInfo(action)}; \n xmlHttp1.open(\"GET\", \"getLinkmanBycustomer.php?action=\"+action+\"&\" + params, false);\n xmlHttp1.send(null);\n}\nfunction showCartInfo(action) {\n if (xmlHttp1.readyState == 4) {\n \t\n if(xmlHttp1.responseText.indexOf(\"root\")==-1)\n \t{\n\t\t\t\talert(xmlHttp1.responseText);\n\t\t\t\treturn false;\n \t}\n \t\tvar doc = new ActiveXObject(\"MSxml2.DOMDocument\");\n \t\t \tdoc.loadXML(xmlHttp1.responseText);\n\t\t\t\n\t\t\tvar rootnode = doc.getElementsByTagName(\"root\")[0];\n \t\t \t\n \t\t \tif(action=='billinfo')\n \t\t \t{\n \t\t \t\t//alert(xmlHttp1.responseText);\n \t\t \t\tvar detailnode = doc.getElementsByTagName(\"billinfo\")[0];\n \t\t \t\tvar totalmoney=0;\n \t\t \t\tvar huikuanjine=0;\n \t\t \t\tvar kaipiaojine=0;\n \t\t \t\tvar quling=0;\n \t\t \t\t\n \t\t \t\tif(detailnode.childNodes[0].childNodes[0]!=null)\n\t\t\t\t \ttotalmoney=detailnode.childNodes[0].childNodes[0].nodeValue;\n\t\t\t\tif(detailnode.childNodes[1].childNodes[0]!=null) \n\t\t\t\t \thuikuanjine=detailnode.childNodes[1].childNodes[0].nodeValue;\n\t\t\t\tif(detailnode.childNodes[2].childNodes[0]!=null)\n\t\t\t\t \tkaipiaojine=detailnode.childNodes[2].childNodes[0].nodeValue;\n \t\t \t\tif(detailnode.childNodes[3].childNodes[0]!=null)\n\t\t\t\t \tquling=detailnode.childNodes[3].childNodes[0].nodeValue;\n\t\t\t\t \t \t\t \t\t\n \t\t \t\tdocument.getElementById('totalmoney').innerText=totalmoney;\n \t\t \t\tdocument.getElementById('quling').innerText=quling;\n \t\t \t\tdocument.getElementById('huikuanjine').innerText=huikuanjine;\n \t\t \t\tdocument.getElementById('kaipiaojine').innerText=kaipiaojine;\n \t\t \t\tform1.piaojujine.value=delFormat(totalmoney)-delFormat(kaipiaojine);\n \t\t \t}\n \t\t \tif(action=='kaipiao')\n \t\t \t{\n \t\t \t\t//alert(xmlHttp1.responseText);\n \t\t \t\tvar yuchuzhi=rootnode.childNodes[0].nodeValue;\n \t\t \t\tdocument.getElementById('yuchuzhi').innerText=yuchuzhi+' 元';\n \t\t \t\tvar detailnode = doc.getElementsByTagName(\"sellbuy\")[0];\n\t\t\t\tvar subcat = new Array();\n\t\t\t\tvar i=0;\n\t\t\t\n\t\t\t\t\n\t\t\t\twhile(detailnode!=null && detailnode.nodeName=='sellbuy')\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\tsubcat[i]=new Array();\n\t\t\t\t\t\tvar rowid=detailnode.childNodes[0].childNodes[0].nodeValue;\n\t\t\t\t\t\tvar zhuti=detailnode.childNodes[1].childNodes[0].nodeValue;\n\t\t\t\t\t\tsubcat[i][0]=rowid;\n\t\t\t\t\t\tsubcat[i][1]=zhuti;\n\t\t\t\t\t\tdocument.form1.{$fieldname2}.options[document.form1.{$fieldname2}.length] = new Option(zhuti, rowid);\n\t\t\t\t\t\tif(rowid=='" . $fields['value'][$fieldname2] . "')\n\t\t\t\t\t\t\tdocument.form1.{$fieldname2}.options[document.form1.{$fieldname2}.length-1].selected=true;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tdetailnode=detailnode.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n }\n};\nfunction changelocation(locationid)\n{\n\tdocument.form1.{$fieldname2}.length = 0;\n\tif(locationid!='')\n\t{\n \tsendRequest('kaipiao','customerid='+locationid);\n \tgetPayType(document.form1.{$fieldname2}.value);\n \t\n }\n\t\n}\nfunction getPayType(billid)\n{\n \tsendRequest('billinfo','billid='+billid);\n}\n\n";
if ($fields['value'][$fieldname1] != '') {
print "window.onload=function(){\n\tchangelocation(" . $fields['value'][$fieldname1] . ");\n\t}\n\t";
}
print "\n</SCRIPT>\n";
print "<TR><TD class=TableData noWrap>客户:</TD><TD class=TableData noWrap>\n";
$customername = returntablefield("customer", "rowid", $fields['value'][$fieldname1], "supplyname");
print "<input type='hidden' name='{$fieldname1}' value='" . $fields['value'][$fieldname1] . "' >";
print "<input type='text' name='" . $fieldname1 . "_ID' value='" . $customername . "' readonly class='SmallStatic' size='30'>";
print " <input type=\"button\" title='' value=\"选择\" class=\"SmallButton\" onClick=\"var oldid=" . $fieldname1 . "_ID.value; SelectAllInforSingle('../../Enginee/Module/kehu_select_single/index.php','','" . $fieldname1 . "_ID', '{$fieldname1}');if(oldid!=" . $fieldname1 . "_ID.value){changelocation(" . $fieldname1 . ".value)};\" > ";
print "</SELECT> {$notnulltext}</TD></TR>\n";
print "<TR><TD class=TableData noWrap>预储值:</TD><TD class=TableData noWrap><div id='yuchuzhi'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>合同订单:</TD><TD class=TableData noWrap>\n";
print "<SELECT onkeydown=\"if(event.keyCode==13)event.keyCode=9\" class=\"{$class}\" \n";
print "size=1 name='" . $fieldname2 . "' onchange=\"getPayType(this.value);\"></SELECT> {$notnulltext1}</TD></TR>\n";
print "<TR><TD class=TableData noWrap>总金额:</TD><TD class=TableData noWrap><div id='totalmoney'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>去零:</TD><TD class=TableData noWrap><div id='quling'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>已回款金额:</TD><TD class=TableData noWrap><div id='huikuanjine'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>已开票金额:</TD><TD class=TableData noWrap><div id='kaipiaojine'></div></TD></TR>\n";
}
示例5: kucuninit_value_PRIV
function kucuninit_value_PRIV($fieldvalue, $fields, $i)
{
global $db;
global $tablename;
global $html_etc;
global $common_html;
$SYSTEM_STOP_ROW['shenhe_priv'] = 1;
$SYSTEM_STOP_ROW['flow_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
$SYSTEM_STOP_ROW['edit_priv'] = 1;
$storeid = $fields['value'][$i]['ROWID'];
$sql = "select * from store_init where storeid={$storeid} and flag=1";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$sql = "select * from store where storeid={$storeid}";
$rs = $db->Execute($sql);
$rs_b = $rs->GetArray();
$userid = returntablefield("stock", "rowid", $storeid, "user_id");
$useridArray = explode(",", $userid);
if (sizeof($rs_a) == 0 && sizeof($rs_b) == 0 && in_array($_SESSION['LOGIN_USER_ID'], $useridArray)) {
$SYSTEM_STOP_ROW['shenhe_priv'] = 0;
}
if (sizeof($rs_a) > 0) {
$SYSTEM_STOP_ROW['flow_priv'] = 0;
}
return $SYSTEM_STOP_ROW;
}
示例6: banzuchengyuan_add
function banzuchengyuan_add($fields, $i)
{
$组员名称 = $fields['value']['组员名称'];
$组员名称Array = explode(',', $组员名称);
for ($i = 0; $i < sizeof($组员名称Array); $i++) {
$组员名称TEXT = $组员名称Array[$i];
if ($组员名称TEXT != "") {
$USER_NAME_TEXT .= returntablefield("user", "USER_ID", $组员名称TEXT, "USER_NAME") . ",";
$USER_ID_TEXT .= $组员名称TEXT . ",";
}
if ($USER_NAME_TEXT == "") {
$USER_ID_TEXT .= returntablefield("user", "USER_NAME", $组员名称TEXT, "USER_ID") . ",";
$USER_NAME_TEXT .= $组员名称TEXT . ",";
}
}
//print $USER_ID_TEXT;
//print $USER_NAME_TEXT;
if ($USER_ID_TEXT == ",") {
$USER_ID_TEXT = '';
}
if ($USER_NAME_TEXT == ",") {
$USER_NAME_TEXT = '';
}
print "<tr>\n\t\t <td nowrap class='TableData' align='center'>授权范围:<br>(人员)</td>\n\t\t <td class='TableData' colspan=2>\n\t\t\t<input type='hidden' name='COPY_TO_ID' value='{$USER_ID_TEXT}'>\n\t\t\t<textarea cols=40 name='COPY_TO_NAME' rows=6 class='BigStatic' wrap='yes' readonly>" . $USER_NAME_TEXT . "</textarea>\n\t\t\t <input type='button' value='添 加' class='SmallButton' onClick=\"SelectUser('','COPY_TO_ID','COPY_TO_NAME')\" title='选择人员' name='button'>\n\t\t\t <input type='button' value='清 空' class='SmallButton' onClick=\"ClearUser('COPY_TO_ID','COPY_TO_NAME')\" title='清空人员' name='button'>\n\t\t </td>\n\t </tr>";
}
示例7: baoBeiShenHe_value_PRIV
function baoBeiShenHe_value_PRIV($fieldvalue, $fields, $i)
{
//print_R($fields['value'][$i]);
$userinfo = returntablefield("user", "user_id", $fields['value'][$i]['createman'], "user_id,dept_id,user_priv");
$userid = $userinfo['user_id'];
$deptid = $userinfo['dept_id'];
$userpriv = $userinfo['user_priv'];
$SYSTEM_STOP_ROW['edit_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
$SYSTEM_STOP_ROW['shenhe_priv'] = 1;
$SYSTEM_STOP_ROW['flow_priv'] = 1;
if ($fields['value'][$i]['state'] == 1) {
if ($userid == $_SESSION['LOGIN_USER_ID']) {
$SYSTEM_STOP_ROW['edit_priv'] = 0;
$SYSTEM_STOP_ROW['delete_priv'] = 0;
}
}
if ($_SESSION['LOGIN_USER_PRIV'] == '1' || $deptid == $_SESSION['LOGIN_DEPT_ID'] && $_SESSION['LOGIN_USER_PRIV'] < $userpriv) {
if ($fields['value'][$i]['state'] == 1) {
$SYSTEM_STOP_ROW['shenhe_priv'] = 0;
} else {
$SYSTEM_STOP_ROW['flow_priv'] = 0;
}
}
return $SYSTEM_STOP_ROW;
}
示例8: callchuli_view
function callchuli_view($fields, $i)
{
$uniturl = '';
$fieldvalue = $fields['value']['customer'];
if ($fields['value']['callertype'] == '客户') {
$uniturl = "<a href='customer_newai.php?" . base64_encode("action=view_default&ROWID=" . $fields['value']['customerid']) . "' target='_blank'>" . $fieldvalue . "</a>";
} else {
if ($fields['value']['callertype'] == '供应商') {
$uniturl = "<a href='supply_newai.php?" . base64_encode("action=view_default&ROWID=" . $fields['value']['customerid']) . "' target='_blank'>" . $fieldvalue . "</a>";
} else {
$customerid = returntablefield("customer", "supplyname", $fieldvalue, "rowid");
if ($customerid != '') {
$uniturl = "<a href='customer_newai.php?" . base64_encode("action=view_default&ROWID=" . $customerid) . "' target='_blank'>" . $fieldvalue . "</a>";
}
}
}
if ($uniturl != '') {
$fieldvalue = $uniturl;
} else {
$tel = returntablefield("callchuli", "id", $fields['value']['id'], "tel");
$fieldvalue .= " <a href='customer_newai.php?" . base64_encode("action=add_default&supplyname=" . $fieldvalue . "&phone=" . $tel) . "' target='_blank'><img src='../Framework/images/notify_new.gif' title='创建客户'></a>";
}
$Text = "<TR><TD class=TableContent noWrap>" . $fields['null'][$i]['inputtext'] . ":</TD><td class=TableData noWrap>{$fieldvalue}</td></tr>";
return $Text;
}
示例9: productzuzhuangstate_value_PRIV
function productzuzhuangstate_value_PRIV($fieldvalue, $fields, $i)
{
global $db;
global $tablename;
global $html_etc;
global $common_html;
$SYSTEM_STOP_ROW['shenhe_priv'] = 1;
$SYSTEM_STOP_ROW['flow_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
$SYSTEM_STOP_ROW['edit_priv'] = 1;
switch ($fieldvalue) {
case "1":
$storeid = returntablefield("productzuzhuang", "billid", $fields['value'][$i]['billid'], "outstoreid");
$userid = returntablefield("stock", "rowid", $storeid, "user_id");
$useridArray = explode(",", $userid);
if (in_array($_SESSION['LOGIN_USER_ID'], $useridArray)) {
$SYSTEM_STOP_ROW['flow_priv'] = 0;
$SYSTEM_STOP_ROW['delete_priv'] = 0;
$SYSTEM_STOP_ROW['edit_priv'] = 0;
}
break;
case "2":
$storeid = returntablefield("productzuzhuang", "billid", $fields['value'][$i]['billid'], "instoreid");
$userid = returntablefield("stock", "rowid", $storeid, "user_id");
$useridArray = explode(",", $userid);
if (in_array($_SESSION['LOGIN_USER_ID'], $useridArray)) {
$SYSTEM_STOP_ROW['shenhe_priv'] = 0;
}
break;
case "3":
break;
}
return $SYSTEM_STOP_ROW;
}
示例10: feiyongclasstype_add
function feiyongclasstype_add($fields, $i)
{
global $db, $_SESSION, $common_html;
$notnull = trim($fields['null'][$i]['inputtype']);
$notnull == 'notnull' ? $notnulltext = $common_html['common_html']['mustinput'] : ($notnulltext = '');
$fieldname1 = $fields['name'][$i];
$kind = $fields['input'][$i][0];
$class = "SmallSelect";
$classid = returntablefield("feiyongtype", "id", $fields['value'][$fieldname1], "classid");
print "<script type=\"text/javascript\" language=\"javascript\" src=\"" . ROOT_DIR . "general/ERP/Enginee/jquery/jquery.js\"></script>";
print "<script language=javascript>\nvar \$\$ = jQuery.noConflict();\nfunction sendRequest(action,params) {\n\n \n \$\$.ajax({ \n\t\t type:'GET', \n\t\t url:'getLinkmanBycustomer.php?action='+action+'&' + params, \n\t\t dataType: 'xml', \n\t\t cache:false,\n\t\t success:function(data) \n\t\t { \n\t\t \n \t\t \t\t\n\t \t\t \t \$\$(data).find('feiyongtype').each(function() {\n \t\t\n\t\t\t\t\t\tvar rowid=\$\$(this).find('id').text();\n\t\t\t\t\t\tvar zhuti=\$\$(this).find('typename').text();\n\n\t\t\t\t\t\tdocument.form1.{$fieldname1}.options[document.form1.{$fieldname1}.length] = new Option(zhuti, rowid);\n\t\t\t\t\t\tif(rowid=='" . $fields['value'][$fieldname1] . "')\n\t\t\t\t\t\t\tdocument.form1.{$fieldname1}.options[document.form1.{$fieldname1}.length-1].selected=true;\n\t\t\t\t\t\n });\t\t\t\t\n\t\t },\n\t\t error:function(XmlHttpRequest,textStatus, errorThrown)\n\t {\n\t\t\t var errorPage = XmlHttpRequest.responseText; \n\t\t\t alert('获取子类出错:'+errorThrown);\n\t }\n\t});\n}\nfunction showCartInfo(action) {\n if (xmlHttp.readyState == 4) {\n \t\n if(xmlHttp.responseText.indexOf(\"root\")==-1)\n \t{\n\t\t\t\talert(xmlHttp.responseText);\n\t\t\t\treturn false;\n \t}\n \t\tvar doc = new ActiveXObject(\"MSxml2.DOMDocument\");\n \t\t \tdoc.loadXML(xmlHttp.responseText);\n \t\t \tvar rootnode = doc.getElementsByTagName(\"root\")[0];\n\t\t\t\n\t\t\tif(action!='')\n \t\t \t{\n\t \t\t \tvar detailnode = doc.getElementsByTagName(\"feiyongtype\")[0];\n\t\t\t\tvar subcat = new Array();\n\t\t\t\tvar i=0;\n\t\t\t\twhile(detailnode!=null)\n\t\t\t\t{\n\t\t\t\t\t\tsubcat[i]=new Array();\n\t\t\t\t\t\tvar id=detailnode.childNodes[0].childNodes[0].nodeValue;\n\t\t\t\t\t\tvar typename=detailnode.childNodes[1].childNodes[0].nodeValue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubcat[i][0]=id;\n\t\t\t\t\t\tsubcat[i][1]=typename;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdocument.form1.{$fieldname1}.options[document.form1.{$fieldname1}.length] = new Option(typename, id);\n\t\t\t\t\t\tif(id=='" . $fields['value'][$fieldname1] . "')\n\t\t\t\t\t\t\tdocument.form1.{$fieldname1}.options[document.form1.{$fieldname1}.length-1].selected=true;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tdetailnode=detailnode.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n }\n}\n\nfunction changelocation(locationid)\n{\n\n\tdocument.form1.{$fieldname1}.length = 0;\t\n\tif(locationid!='')\n\t sendRequest('feiyongtype','classid='+locationid);\n}\nwindow.onload=function (){\n\tchangelocation(form1.classid.value);\n\t}\n";
print "\n</SCRIPT>\n";
print "<TR><TD class=TableData noWrap>大类:</TD><TD class=TableData noWrap>\n";
print "<select name='classid' onkeydown=\"if(event.keyCode==13)event.keyCode=9\" onchange=changelocation(this.value);>";
$sql = "select * from feiyongclass where kind={$kind}";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$selected = '';
for ($i = 0; $i < count($rs_a); $i++) {
if ($rs_a[$i]['id'] == $classid) {
$selected = 'selected';
} else {
$selected = '';
}
print "<option {$selected} value='" . $rs_a[$i]['id'] . "'>" . $rs_a[$i]['classname'] . "</option>";
}
print "</select></TD></TR>\n";
print "<TR><TD class=TableData noWrap>子类:</TD><TD class=TableData noWrap>\n";
print "<SELECT name={$fieldname1} class=\"{$class}\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n";
print "</SELECT> {$notnulltext}</TD></TR>\n";
print "<input type='hidden' name='kind' value='{$kind}'>";
}
示例11: storecheck_value_PRIV
function storecheck_value_PRIV($fieldvalue, $fields, $i)
{
global $db;
$storeid = returntablefield("storecheck", "billid", $fields['value'][$i]['billid'], "storeid");
$userid = returntablefield("stock", "rowid", $storeid, "user_id");
$useridArray = explode(",", $userid);
$SYSTEM_STOP_ROW['flow_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
$SYSTEM_STOP_ROW['edit_priv'] = 1;
switch ($fieldvalue) {
case "盘点中":
$color = "red";
if (in_array($_SESSION['LOGIN_USER_ID'], $useridArray)) {
$SYSTEM_STOP_ROW['flow_priv'] = 0;
$SYSTEM_STOP_ROW['edit_priv'] = 0;
$SYSTEM_STOP_ROW['delete_priv'] = 0;
}
break;
case "盘点结束":
$color = "green";
if (in_array($_SESSION['LOGIN_USER_ID'], $useridArray)) {
$SYSTEM_STOP_ROW['delete_priv'] = 0;
}
}
return $SYSTEM_STOP_ROW;
}
示例12: deptment_value_PRIV
function deptment_value_PRIV($fieldvalue, $fields, $i)
{
global $db;
global $tablename;
global $html_etc;
global $common_html;
//print_R($fields['value'][$i]);
$FieldValue = $fields['value'][$i]['DEPT_ID'];
$tableNo = returntablefield("department", "DEPT_PARENT", $FieldValue, "DEPT_PARENT");
if ($tableNo != '') {
$flag = 1;
}
$tableNo = returntablefield("user", "DEPT_ID", $FieldValue, "DEPT_ID");
if ($tableNo != '') {
$flag = 1;
}
//$tablecode = $fields['value'][$i]['tablecode'];
//$tableNo = returntablefield( "stockoutmain", "tablecode", $tablecode, "tableNo" );
if ($flag == 1) {
$SYSTEM_STOP_ROW['delete_priv'] = 1;
} else {
$SYSTEM_STOP_ROW['delete_priv'] = 0;
}
$SYSTEM_STOP_ROW['edit_priv'] = 0;
return $SYSTEM_STOP_ROW;
}
示例13: CustomerFuKuan_add
function CustomerFuKuan_add($fields, $i)
{
global $db, $_SESSION, $common_html;
$notnull = trim($fields['null'][$i]['inputtype']);
$notnull == 'notnull' ? $notnulltext = $common_html['common_html']['mustinput'] : ($notnulltext = '');
$fieldname1 = $fields['name'][$i];
$fieldname2 = $fields['input'][$i][0];
$j = array_search($fieldname2, $fields['name'], true);
$notnull = trim($fields['null'][$j]['inputtype']);
$notnull == 'notnull' ? $notnulltext1 = $common_html['common_html']['mustinput'] : ($notnulltext1 = '');
$action = $fields['input'][$i][1];
$class = "SmallSelect";
print "<script type=\"text/javascript\" language=\"javascript\" src=\"" . ROOT_DIR . "general/ERP/Enginee/jquery/jquery.js\"></script>";
print "<script language=javascript>\n\n\$(document).ready(function (){\t\n\t\n\tif(document.form1.accountid)\n\t\tdocument.form1.accountid.options[document.form1.accountid.length] = new Option('预付款支付', '0');";
if ($fields['value'][$fieldname1] != '') {
print "changelocation(" . $fields['value'][$fieldname1] . ");\n\t\t getPayType(" . $fields['value'][$fieldname2] . ");";
}
print "});\nfunction changelocation(locationid)\n{\n\tdocument.form1.{$fieldname2}.length = 0;\n\tif(locationid!='')\n\t{\n \tsendRequest('{$action}','customerid='+locationid);\n \tgetPayType(document.form1.{$fieldname2}.value);\n \t\n }\n\t\n}\nfunction getPayType(billid)\n{\n \tsendRequest('caigouinfo','billid='+billid);\n}\nvar totalmoney=0;\nvar huikuanjine=0;\nvar kaipiaojine=0;\nvar quling=0; \nfunction sendRequest(action,params) {\n\$.ajax({ \n\t\t type:'GET', \n\t\t url:'getLinkmanBycustomer.php?action='+action+'&'+params, \n\t\t dataType: 'xml', \n\t\t cache:false,\n\t\t async: false,\n\t\t success:function(data) \n\t\t { \n\t\t \tif(action=='fukuan' || action=='shoupiao')\n \t\t \t{\n \t\t\n\t\t \t";
print "var yuchuzhi=\$(data).find('chuzhi').text();\n \t\t \t\t\t\$('#yuchuzhi').text(yuchuzhi+' 元');\n\n \t\t \t\t \$(data).find('sellbuy').each(function(i) {\n \t\n\t\t\t\t\t\tvar rowid=\$(this).children('rowid').text();\n\t\t\t\t\t\tvar zhuti=\$(this).children('zhuti').text();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tdocument.form1.{$fieldname2}.options[document.form1.{$fieldname2}.length] = new Option(zhuti, rowid);\n\t\t\t\t\t\tif(rowid=='" . $fields['value'][$fieldname2] . "')\n\t\t\t\t\t\t\tdocument.form1.{$fieldname2}.options[document.form1.{$fieldname2}.length-1].selected=true;\n\t\t\t\t\t\ti++;\n });\t\n \t\t \t}\n \t\t \tif(action=='caigouinfo')\n \t\t \t{\n \t\t\n\t\t\t\t\$(data).find('caigouinfo').each(function(i) {\n\t\t\t\t\tif(\$(this).children('totalmoney')!=null)\n\t\t\t\t\t \ttotalmoney=\$(this).children('totalmoney').text();\n\t\t\t\t\tif(\$(this).children('paymoney')!=null) \n\t\t\t\t\t \thuikuanjine=\$(this).children('paymoney').text();\n\t\t\t\t\tif(\$(this).children('shoupiaomoney')!=null)\n\t\t\t\t\t \tkaipiaojine=\$(this).children('shoupiaomoney').text();\n\t \t\t \t\tif(\$(this).children('oddment')!=null)\n\t\t\t\t\t \tquling=\$(this).children('oddment').text(); \t\n\t\t\t\t\t \t\t\n\t \t\t \t\t\$('#totalmoney').text(totalmoney);\n\t \t\t \t\t\$('#paymoney').text(huikuanjine);\n\t \t\t \t\t\$('#shoupiaomoney').text(kaipiaojine);\n\t \t\t \t\t\$('#oddment').text(quling);\n\t \t\t \t\tif(form1.jine!=null)\n\t \t\t \t\t\tform1.jine.value=delFormat(totalmoney)-delFormat(huikuanjine)-delFormat(quling);\n\t \t\t \t\tif(form1.piaojujine!=null)\n\t \t\t \t\t\tform1.piaojujine.value=delFormat(totalmoney)-delFormat(kaipiaojine);\n\t \t\t \t\tif(form1.oddment!=null)\n\t \t\t \t\t\tform1.oddment.value=0;\n \t\t \t\t});\t\n \t\t \t}\n\t \t\t \t\t\t\t\n\t\t },\n\t\t error:function(XmlHttpRequest,textStatus, errorThrown)\n\t {\n\t\t\t var errorPage = XmlHttpRequest.responseText; \n\t\t\t alert('获取采购单出错:'+errorThrown);\n\t }\n\t});\n\n}\n\n</SCRIPT>\n";
print "<TR><TD class=TableData noWrap>供应商:</TD><TD class=TableData noWrap>\n";
$supplyname = returntablefield("supply", "rowid", $fields['value'][$fieldname1], "supplyname");
$fieldnameID = $fieldname1 . "_ID";
print "<input type=\"hidden\" name=\"{$fieldname1}\" value=\"" . $fields['value'][$fieldname1] . "\" onchange='changelocation(this.value);'>";
print "<input name=\"" . $fieldnameID . "\" value=\"" . $supplyname . "\" class=\"SmallStatic\" readonly size=30> \n";
print "<input type=\"button\" title='' value=\"选择\" class=\"SmallButton\" onClick=\"SelectAllInforSingle('../../Enginee/Module/supply_select_single/index.php','','{$fieldnameID}', '{$fieldname1}');\" > {$notnulltext}";
print "<TR><TD class=TableData noWrap>预付款:</TD><TD class=TableData noWrap><div id='yuchuzhi'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>采购单:</TD><TD class=TableData noWrap>\n";
print "<SELECT onkeydown=\"if(event.keyCode==13)event.keyCode=9\" class=\"{$class}\" \n";
print "size=1 name='" . $fieldname2 . "' onchange=\"getPayType(this.value);\"></SELECT> {$notnulltext1}</TD></TR>\n";
print "<TR><TD class=TableData noWrap>总金额:</TD><TD class=TableData noWrap><div id='totalmoney'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>已去零:</TD><TD class=TableData noWrap><div id='oddment'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>已付款金额:</TD><TD class=TableData noWrap><div id='paymoney'></div></TD></TR>\n";
print "<TR><TD class=TableData noWrap>已收票金额:</TD><TD class=TableData noWrap><div id='shoupiaomoney'></div></TD></TR>\n";
}
示例14: JiaoFuPriv_value
function JiaoFuPriv_value($fieldvalue, $fields, $i)
{
$zhuti = returntablefield("sellplanmain", "billid", $fieldvalue, "zhuti");
$user_flag = returntablefield("sellplanmain", "billid", $fieldvalue, "user_flag");
$img = "";
$title = '';
if ($user_flag == "1") {
$img = "proc.gif";
$title = '执行中';
} else {
if ($user_flag == "2") {
$img = "over.gif";
$title = '完成';
} else {
if ($user_flag == "0") {
$img = "time.gif";
$title = '临时单';
} else {
if ($user_flag == "-1") {
$img = "exit.gif";
$title = '临时单';
}
}
}
}
return "<a href='sellcontract_newai.php?" . base64_encode("action=view_default&billid=" . $fieldvalue) . "' target='_blank'>" . $zhuti . "</a><img src='../../Framework/images/" . $img . "' title='{$title}'>";
}
示例15: workplanstate_value_PRIV
function workplanstate_value_PRIV($fieldvalue, $fields, $i)
{
$userinfo = returntablefield("user", "user_id", $fields['value2'][$i]['createman'], "user_id,dept_id,user_priv");
$userid = $userinfo['user_id'];
$deptid = $userinfo['dept_id'];
$userpriv = $userinfo['user_priv'];
$SYSTEM_STOP_ROW['edit_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
$SYSTEM_STOP_ROW['shenhe_priv'] = 1;
$SYSTEM_STOP_ROW['flow_priv'] = 1;
if ($userid == $_SESSION['LOGIN_USER_ID']) {
$detailid = returntablefield("workplanmain_detail", "mainrowid", $fields['value'][$i]['id'], "id");
if ($detailid == '') {
$SYSTEM_STOP_ROW['edit_priv'] = 0;
}
$SYSTEM_STOP_ROW['delete_priv'] = 0;
if ($fields['value2'][$i]['state'] == 2) {
$SYSTEM_STOP_ROW['shenhe_priv'] = 0;
}
}
if ($fields['value2'][$i]['shenchastate'] != '') {
$SYSTEM_STOP_ROW['shenhe_priv'] = 1;
$SYSTEM_STOP_ROW['delete_priv'] = 1;
}
$zhixingrenArray = explode(",", $fields['value'][$i]['zhixingren']);
if (in_array($_SESSION['LOGIN_USER_ID'], $zhixingrenArray) && $fields['value2'][$i]['state'] < 2) {
$SYSTEM_STOP_ROW['flow_priv'] = 0;
}
return $SYSTEM_STOP_ROW;
}