当前位置: 首页>>代码示例>>PHP>>正文


PHP table_begin函数代码示例

本文整理汇总了PHP中table_begin函数的典型用法代码示例。如果您正苦于以下问题:PHP table_begin函数的具体用法?PHP table_begin怎么用?PHP table_begin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了table_begin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: newaiinit

function newaiinit($fields, $mode)
{
    global $common_html, $html_etc;
    global $return_sql_line, $db;
    global $action_add, $action_model;
    global $_POST, $_GET, $ROWS_PAGE, $mark;
    global $merge, $childnums, $childsums, $child_filter;
    global $SYSTEM_ADD_SQL;
    $fields = newaiinit_value($fields);
    if ($merge) {
        $fields = newai_merge($fields, $merge);
    }
    if ($childnums) {
        $fields = newai_childnums($fields, $childnums);
    }
    if ($childsums) {
        $fields = newai_childsums($fields, $childsums);
    }
    global $tablewidth;
    $tablewidth = $tablewidth != "" ? $tablewidth : 450;
    //增加对高级搜索支持
    if ($_GET['actionadv'] == "exportadv_default") {
        newai_search($fields);
    }
    table_begin($tablewidth);
    show_search_element($mark);
    //“新建”按钮查询按钮的控制函数,此函数在newai.php中定义
    newaiinit_view($fields);
    UserDefineFunction();
    UserSumFunction($fields);
    //print_R($_REQUEST);
    if ($_GET['action'] == "") {
        $_GET['action'] = "init_default";
    }
    if ($_REQUEST['action'] != "") {
        $_GET['action'] = $_REQUEST['action'];
    }
    //print_R($_GET);
    newaiinit_bottommemo();
    newaiinit_bottom($fields['other']['rc'], $fields['other']['pageid'], $fields['other']['pagenums'], $ROWS_PAGE, $add = 'action', $add_var = $_GET['action']);
    table_end();
}
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:42,代码来源:newai_init.php

示例2: _query

 function _query($sql, $inputarr)
 {
     global $ADODB_COUNTRECS;
     // Move to the next recordset, or return false if there is none. In a stored proc
     // call, mysqli_next_result returns true for the last "recordset", but mysqli_store_result
     // returns false. I think this is because the last "recordset" is actually just the
     // return value of the stored proc (ie the number of rows affected).
     // Commented out for reasons of performance. You should retrieve every recordset yourself.
     //	if (!mysqli_next_result($this->connection->_connectionID))	return false;
     if (is_array($sql)) {
         // Prepare() not supported because mysqli_stmt_execute does not return a recordset, but
         // returns as bound variables.
         $stmt = $sql[1];
         $a = '';
         foreach ($inputarr as $k => $v) {
             if (is_string($v)) {
                 $a .= 's';
             } else {
                 if (is_integer($v)) {
                     $a .= 'i';
                 } else {
                     $a .= 'd';
                 }
             }
         }
         $fnarr = array_merge(array($stmt, $a), $inputarr);
         $ret = call_user_func_array('mysqli_stmt_bind_param', $fnarr);
         $ret = mysqli_stmt_execute($stmt);
         return $ret;
     }
     /*
     if (!$mysql_res =  mysqli_query($this->_connectionID, $sql, ($ADODB_COUNTRECS) ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT)) {
         if ($this->debug) ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg());
         return false;
     }
     
     return $mysql_res;
     */
     if ($this->multiQuery) {
         $rs = mysqli_multi_query($this->_connectionID, $sql . ';');
         if ($rs) {
             $rs = $ADODB_COUNTRECS ? @mysqli_store_result($this->_connectionID) : @mysqli_use_result($this->_connectionID);
             return $rs ? $rs : true;
             // mysqli_more_results( $this->_connectionID )
         }
     } else {
         $rs = mysqli_query($this->_connectionID, $sql, $ADODB_COUNTRECS ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT);
         if ($rs) {
             return $rs;
         } else {
             $sql = trim($sql);
             //print_R($rs);
             global $SYSTEM_DEBUG_SQL;
             if (strlen($sql) > 6 && $SYSTEM_DEBUG_SQL == 1 && !$rs) {
                 page_css("向软件开发商报告错误");
                 table_begin("600");
                 print_title("警告:发生SQL语句错误信息!");
                 print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;报告时间</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . date("Y-m-d H:i:s") . "</TD>\n\t\t\t\t\t\t\t</TR>";
                 print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;错误类型</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;SQL语句出现错误</TD>\n\t\t\t\t\t\t\t</TR>";
                 print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;文件地址</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $_SERVER['PHP_SELF'] . "</TD>\n\t\t\t\t\t\t\t</TR>";
                 print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;SQL语句</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $sql . "</TD>\n\t\t\t\t\t\t\t</TR>";
                 print "<TR>\n\t\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;错误信息</TD>\n\t\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $this->ErrorMsg() . "</TD>\n\t\t\t\t\t\t\t</TR>";
                 //$sqlTEXT2010 = ereg_replace("'","____",$sqlTEXT2010);
                 $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010);
                 $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010);
                 //$mysql_error = ereg_replace("'","____",$mysql_error);
                 $mysql_error = ereg_replace("=", "+", $mysql_error);
                 $mysql_error = ereg_replace("=", "+", $mysql_error);
                 $FILE_PATH = $_SERVER['REQUEST_URI'];
                 $FILE_PATH = ereg_replace("=", "+", $FILE_PATH);
                 $FILE_PATH = ereg_replace("=", "+", $FILE_PATH);
                 table_end();
                 //print_R($_SERVER);
                 exit;
             }
         }
     }
     if ($this->debug) {
         ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg());
     }
     return false;
 }
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:82,代码来源:adodb-mysqli.inc.php

示例3: newaiCharts


//.........这里部分代码省略.........
                        case 'Year':
                            $ResultFieldName = $ResultFieldCode . "" . $common_html['common_html']['year'];
                            break;
                        default:
                            $ResultFieldName = returntablefield($tablenameIndex, $WhatIndex, $ResultFieldCode, $ReturnIndex);
                            if ($ResultFieldName == "") {
                                $ResultFieldName = $ResultFieldCode;
                            }
                            break;
                    }
                    $TotalNumberIndex += $ResultNumber;
                    $TotalSumIndex += $ResultSum;
                    $Array_Statistic_Value = $sum_index != "" ? $ResultSum : $ResultNumber;
                    $Array['XData'][$i]['Name'] = $ResultFieldName;
                    $Array['XData'][$i]['Value'] = $Array_Statistic_Value;
                    $Array['XData'][$i]['Dir'] = $ResultFieldName;
                    $Array['XData'][$i]['AltText'] = $ResultFieldName;
                    //$Array['XData'][$i]['Url'] = "?action=init_customer&$fieldName=$ResultFieldCode";
                    $ColorArray[$i] == "" ? $ColorArray[$i] = "0xCC0000" : '';
                    $Array['XData'][$i]['Color'] = $ColorArray[$i];
                    $Array['Dir'][$i]['Name'] = $ResultFieldName;
                    $Array['Dir'][$i]['Color'] = $ColorArray[$i];
                    $Array['YData']['AltText'] = "移动查看详细信息";
                    $Array['YData']['Value'] < $Array_Statistic_Value ? $Array['YData']['Value'] = $Array_Statistic_Value : '';
                }
                $Array['title'] = $html_etc[$tablename][$tabletitle] . "[" . $html_etc[$tablename][$fieldName] . "]";
                $array_graphInfo = $Array['title'] . "[" . date("Y-m-d H:i:s") . "] " . $common_html['common_html']['totalrecords'] . ": " . $TotalNumberIndex;
                if ($sum_index != "") {
                    $array_graphInfo .= " " . $common_html['common_html']['allnumbers'] . ": " . $TotalSumIndex . " &nbsp;" . $UserUnitFunctionIndex . "\n";
                }
                $Array['graphInfo'] = $array_graphInfo;
                //print_R($FlashFileName);
                //本表操作部分--FALSH图表显示部分--显示FLASH图表的结果
                table_begin("650");
                $ChartMode = $showlistfieldtypeArray[$k];
                //采用的图表类型选择
                //print $tablename;
                switch ($ChartMode) {
                    case 'vBarF':
                        $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k);
                        //Flash XML 数据写入文件区
                        $create_chart = create_chart("vBarF", $FlashFileName);
                        //FLASH 图表读入XML数据处理以后的显示区
                        break;
                    case 'hBarF':
                        $FlashFileName = WriteXmlFilehBarF($Array, $tablename, $k);
                        //Flash XML 数据写入文件区
                        $create_chart = create_chart("hBarF", $FlashFileName);
                        //FLASH 图表读入XML数据处理以后的显示区
                        break;
                    case 'pieF':
                        $FlashFileName = WriteXmlFilePieF($Array, $tablename, $k);
                        //Flash XML 数据写入文件区
                        $create_chart = create_chart("pieF", $FlashFileName);
                        //FLASH 图表读入XML数据处理以后的显示区
                        break;
                    default:
                        $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k);
                        //Flash XML 数据写入文件区
                        $create_chart = create_chart("vBarF", $FlashFileName);
                        //FLASH 图表读入XML数据处理以后的显示区
                        break;
                }
                //HTML文体显示部分
                print "<TR class=TableData>";
                print "<TD noWrap width=100% align=center colspan=40>";
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:67,代码来源:newai_charts.php

示例4: CheckSystemPrivate

CheckSystemPrivate("数字化校园系统设置-数据字典");
//######################教育组件-权限较验部分##########################
$GLOBAL_SESSION = returnsession();
$CurXueQi = returntablefield("edu_xueqiexec", "当前学期", '1', "学期名称");
if ($_GET['开课教师'] != "") {
    $SHOWTEXT = "1";
} else {
    $SHOWTEXT = "0";
}
$goalfile = "../../Framework/system_config.ini";
if ($_GET['action'] == "") {
    $parse_ini_file = parse_ini_file($goalfile);
    page_css("预设省份区域");
    print "<SCRIPT>\n\tfunction FormCheck()\n\t{\n\t\t//if (document.form1.开课教师.value == \"\") {\n\t\t//alert(\"教师信息没有填写\");\n\t\t//return false;}\n\t}\n\tfunction td_calendar(fieldname) {\n\t\tmyleft=document.body.scrollLeft+event.clientX-event.offsetX-80;\n\t\tmytop=document.body.scrollTop+event.clientY-event.offsetY+140;\n\t\twindow.showModalDialog(fieldname,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:200px;dialogTop:\"+mytop+\"px;dialogLeft:\"+myleft+\"px\");\n\t\t}\n\t</SCRIPT>";
    print "<FORM name=form1 onsubmit=\"return FormCheck();\"  action=\"?action=DataDeal&pageid=1\" method=post encType=multipart/form-data>";
    table_begin("80%");
    print "<tr class=TableHeader><td colspan=2>&nbsp;预设省份区域[在某些使用到省份地市区县三级联动时,进行默认的值]</td></tr>";
    print_select_countryCode($parse_ini_file['provinces'], $fields);
    print_submit("提交");
    table_end();
    form_end();
    exit;
}
if ($_GET['action'] == "DataDeal") {
    page_css("预设省份区域");
    //$file = file($goalfile);
    $DataText = "[section]\nprovinces=" . $_POST['areaCode'];
    @(!($handle = fopen($goalfile, 'w')));
    fwrite($handle, $DataText);
    fclose($handle);
    //print_R($_POST);
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:gb_area_newai.php

示例5: returntablecolumn

 $returnmodel = $file_ini[$action]['returnmodel'];
 $hidden_field = $file_ini[$action]['hidden_field'];
 $passwordcheck = $file_ini[$action]['passwordcheck'];
 $delete_attribute = $file_ini[$action]['delete_attribute'];
 $showlistfieldfilter = $file_ini['init_default']['showlistfieldfilter'];
 $showlistfieldlist = $file_ini['init_default']['showlistfieldlist'];
 $columns = returntablecolumn($tablename);
 $html_etc = returnsystemlang($tablename, $SYTEM_CONFIG_TABLE);
 $primarykey_index = $columns[$primarykey];
 //print $passwordcheck;
 if ($passwordcheck == "1" && $_GET['actionAdvDelete'] != "AdvDelete" && $_GET['actionAdvDelete'] != "InforCheck") {
     page_css("密码二次验证");
     print "<body onload=\"document.form1.PASSWORD.focus();\">\n";
     //Array ( [action] => delete_array [returnmodel] => init_default [selectid] => 412, [pageid] => 1
     print "<form name=form1 action=\"?XX=XX&actionAdvDelete=InforCheck&action=delete_array&returnmodel=init_default&selectid=" . $_GET['selectid'] . "\" method=post encType=multipart/form-data>";
     table_begin("500");
     print_title("请输入您的用户密码,属于关键性操作,需要进行二次密码验证");
     print "<tr class=TableData><td width=25%>&nbsp;您的密码:</td><td>\n\t\t\t\t\t\t<input type=password name='PASSWORD' class=SmallInput >\n\t\t\t\t\t\t(您当前的登录密码)</td></tr>";
     print_submit("提交");
     table_end();
     form_end();
     //print_R($_GET);
     exit;
 } else {
     if ($passwordcheck == "1" && $_GET['actionAdvDelete'] == "InforCheck") {
         page_css("密码二次验证");
         global $db;
         //print_R($_SESSION);
         $LOGIN_USER_ID = $_SESSION['LOGIN_USER_ID'];
         $返回当前用户的密码 = returntablefield("user", "USER_ID", $LOGIN_USER_ID, "PASSWORD");
         //$PASSWORD		= md5(TRIM($_POST['PASSWORD']));
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:newai_control.php

示例6: TRIM

    $rs_a = $rs->GetArray();
    //print_R($cursor1);exit;
    $MODULE2 = TRIM($rs_a[0]['MODULE']);
    //print $MODULE2;
    if ($MODULE2 != "") {
        $sql = "update systemprivateinc set `DEPT_ID`='{$DEPT_ID}',`USER_ID`='{$USER_ID}',`ROLE_ID`='{$ROLE_ID}',`DEPT_NAME`='{$DEPT_NAME}',`USER_NAME`='{$USER_NAME}',`ROLE_NAME`='{$ROLE_NAME}' where `FILE`='{$FILE}' and `MODULE`='{$MODULE}'";
    } else {
        $sql = "insert into systemprivateinc values('','{$FILE}','{$MODULE}','{$DEPT_ID}','{$DEPT_NAME}','{$ROLE_ID}','{$ROLE_NAME}','{$USER_ID}','{$USER_NAME}')";
    }
    $db->Execute($sql);
    print_infor("您的配置已经完成", '', "location='?'", "?");
    exit;
}
table_begin("100%");
print "<tr class=TableHeader><td colspan=5>&nbsp;" . $TextHeader . "</td></tr>";
print "<tr class=TableHeader><td>&nbsp;所属部门</td><td>&nbsp;编辑权限</td><td>&nbsp;管理人员</td></tr>";
for ($i = 0; $i < sizeof($rsX_a); $i++) {
    $部门名称 = $rsX_a[$i]['所属部门'];
    $sql = "select * from systemprivateinc where MODULE='" . $部门名称 . "' and FILE='{$PHP_SELF}'";
    $rs = $db->Execute($sql);
    $rs_a = $rs->GetArray();
    if ($部门名称 != "") {
        print "<tr class=TableData><td>&nbsp;" . $部门名称 . "</td><td><a href=\"?" . base64_encode("FileNameSELF=" . $PHP_SELF_SELF . "&FileName=" . $PHP_SELF . "&ModuleName=" . $部门名称 . "") . "\">&nbsp;编辑权限</a></td>\n\t\t\t<td>&nbsp;" . $rs_a[0]['USER_NAME'] . "</td>\n\t\t\t</tr>";
    }
}
table_end();
print "<BR>";
table_begin("100%");
print "<tr class=TableHeader><td>事项说明:</td></tr>";
print "<tr class=TableData><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每个部门指定一个管理员,那么这个管理员可以在'部门级管理'这个菜单中管理对应所属部门的相关信息;这个功能适用于分部门权限管理情形.</td></tr>";
table_end();
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:inc_fixedasset_priv.php

示例7: getpagedata_checkall

function getpagedata_checkall($sql, $sql_num, $pageid, $functionname, $tablename, $add, $add_var, $width = "450", $pagenum = "15", $isshowtableheader = '', $disabled = '', $action_page = 'action_page', $action_page_value = 'action_page_value')
{
    global $db;
    global $html_etc;
    global $common_html;
    //require_once('lang/getpagedata_html.php');
    $rs =& $db->Execute($sql_num);
    $rc = $rs->fields['num'];
    if ($rc == 0) {
        print_infor($common_html['common_html']['norecord'], 'trip', "location='?action=init'");
        exit;
    }
    $ROWS_PAGE = $pagenum;
    $pagenums = ceil($rc / $ROWS_PAGE);
    if ($pageid == "" || empty($pageid)) {
        $pageid = 1;
    }
    if ($pageid > $pagenums) {
        $pageid = $pagenums;
    }
    $from = ($pageid - 1) * $ROWS_PAGE;
    $rsl = $db->CacheSelectLimit(15, $sql, $ROWS_PAGE, $from);
    require_once "./lib/choose_all_en.js";
    table_begin($width);
    if ($isshowtableheader == '') {
        $function_header = "show" . $tablename . "_header";
        $function_header();
    } else {
        if ($notshowtableheader == 'notshowtableheader') {
        } else {
            if ($isshowtableheader != 'notshowtableheader' && $isshowtableheader != '') {
                $isshowtableheader();
            } else {
            }
        }
    }
    while (!$rsl->EOF) {
        $functionname($rsl, $pageid);
        $rsl->MoveNext();
    }
    print "<tr><td class=TableData noWrap colspan=20>";
    if ($rc == 0) {
        print "<input type=\"checkbox\" name=\"allbox\" disabled onClick=\"check_all();\">" . $common_html['common_html']['chooseall'] . " &nbsp;&nbsp;\n";
        print "<input type=\"button\"  value=\"" . $common_html['common_html']['delete'] . "\" class=\"SmallButton\" disabled onClick=\"delete_mail();\" title=\"" . $common_html['common_html']['delete'] . "\"> &nbsp;&nbsp;&nbsp;&nbsp;\n";
    } else {
        print "<input type=\"checkbox\" name=\"allbox\"  onClick=\"check_all();\">" . $common_html['common_html']['chooseall'] . " &nbsp;&nbsp;\n";
        print "<input type=\"button\"  value=\"" . $common_html['common_html']['delete'] . "\" class=\"SmallButton\" {$disabled} onClick=\"delete_mail();\" title=\"" . $common_html['common_html']['delete'] . "\"> &nbsp;&nbsp;&nbsp;&nbsp;\n";
    }
    if ($add != "" && $add_var != "") {
        if ($pageid <= 1) {
            echo "" . $common_html['common_html']['firstpage'] . " ";
            echo "" . $common_html['common_html']['prevpage'] . " ";
        } else {
            echo "<a href=\"{$PHP_SELF}?{$add}={$add_var}&pageid=1\" title=\"" . $common_html['common_html']['firstpage'] . "\">" . $common_html['common_html']['firstpage'] . "</a> ";
            echo "<a href=\"{$PHP_SELF}?{$add}={$add_var}&pageid=" . ($pageid - 1) . "\" title=\"" . $common_html['common_html']['prevpage'] . "\">" . $common_html['common_html']['prevpage'] . "</a> ";
        }
        //end if
        if ($pageid == $pagenums) {
            echo "" . $common_html['common_html']['nextpage'] . " ";
            echo "" . $common_html['common_html']['lastpage'] . "";
        } else {
            echo "<a href=\"{$PHP_SELF}?{$add}={$add_var}&pageid=" . ($pageid + 1) . "\" title=\"" . $common_html['common_html']['nextpage'] . "\">" . $common_html['common_html']['nextpage'] . "</a> ";
            echo "<a href=\"{$PHP_SELF}?{$add}={$add_var}&pageid={$pagenums}\" title=\"" . $common_html['common_html']['lastpage'] . "\">" . $common_html['common_html']['lastpage'] . "</a> ";
        }
        //end if
    } else {
        if ($pageid <= 1) {
            echo "" . $common_html['common_html']['firstpage'] . " ";
            echo "" . $common_html['common_html']['prevpage'] . " ";
        } else {
            echo "<a href=\"{$PHP_SELF}?pageid=1\" title=\"" . $common_html['common_html']['firstpage'] . "\">" . $common_html['common_html']['firstpage'] . "</a> ";
            echo "<a href=\"{$PHP_SELF}?pageid=" . ($pageid - 1) . "\" title=\"" . $common_html['common_html']['prevpage'] . "\">" . $common_html['common_html']['prevpage'] . "</a> ";
        }
        //end if
        if ($pageid == $pagenums) {
            echo "" . $common_html['common_html']['nextpage'] . " ";
            echo "" . $common_html['common_html']['lastpage'] . " ";
        } else {
            echo "<a href=\"{$PHP_SELF}?pageid=" . ($pageid + 1) . "\" title=\"" . $common_html['common_html']['nextpage'] . "\">" . $common_html['common_html']['nextpage'] . "</a> ";
            echo "<a href=\"{$PHP_SELF}?pageid={$pagenums}\" title=\"" . $common_html['common_html']['lastpage'] . "\">" . $common_html['common_html']['lastpage'] . "</a> ";
        }
        //end if
    }
    print "( " . $common_html['common_html']['page'] . " " . $pageid . "/" . $pagenums . "  " . $rc . " )\n";
    if ($add == '' || $add_var == '') {
        $add = 'add';
        $add_var = 'add_var';
    }
    print "<input type=\"hidden\" name=\"ADD_INPUT\" value=\"{$add}\">\n";
    print "<input type=\"hidden\" name=\"ADD_VAR_INPUT\" value=\"{$add_var}\">\n";
    print "<input type=\"hidden\" name=\"action_page\" value=\"{$action_page}\">\n";
    print "<input type=\"hidden\" name=\"action_page_value\" value=\"{$action_page_value}\">\n";
    print "<input type=\"button\"  value=\"" . $common_html['common_html']['indexto'] . "\" class=\"SmallButton\" onclick=\"set_page();\" title=\"" . $common_html['common_html']['indexto'] . "\">&nbsp;\n";
    print "<input type=\"text\" name=\"PAGE_NUM\" value=\"{$pageid}\" class=\"SmallInput\" size=\"2\">&nbsp;&nbsp;\n";
    print "</td></tr>\n";
    print "</table>";
}
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:97,代码来源:getpagedata.php

示例8: newai_export

function newai_export($fields, $mode = 'table')
{
    global $common_html, $html_etc;
    global $return_sql_line, $db;
    global $columns;
    //print_R($_GET);
    global $showlistfieldlist, $group_filter;
    $tablename = $fields['table']['name'];
    $SQL = $fields['sql']['SQL'];
    $init = explode('_', $_GET['action']);
    $mark = $init[1];
    global $tablewidth;
    $tablewidth = $tablewidth != "" ? $tablewidth : 450;
    if ($group_filter != "") {
        $group_filter_Array = explode(':', $group_filter);
        $TableFieldIndex = $group_filter_Array[0];
        $KeyName = $columns[$TableFieldIndex];
        $ChildTableName = $group_filter_Array[1];
        $ChildTableFieldValueIndex = $group_filter_Array[2];
        $ChildTableFieldNameIndex = $group_filter_Array[3];
        $ChildColumns = returntablecolumn($ChildTableName);
        $ChildTableFieldValue = $ChildColumns[$ChildTableFieldValueIndex];
        $ChildTableFieldName = $ChildColumns[$ChildTableFieldNameIndex];
        $Childhtml_etc = returnsystemlang($ChildTableName, $SYTEM_CONFIG_TABLE);
        //print_R($Childhtml_etc);
        $ChildTableFieldHTMLValue = $Childhtml_etc[$ChildTableName][$ChildTableFieldValue];
        $ChildTableFieldHTMLName = $Childhtml_etc[$ChildTableName][$ChildTableFieldName];
    } else {
        $KeyName = "说明";
    }
    print "<script>\n\t//CSV\n\tfunction selectid_str_init_CSV(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\n\n\t";
    if ($_GET['actionadv'] == "exportadv_default") {
        //不用显示或得到SELECTID的值
        print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_";
    } else {
        print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t";
        print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_";
    }
    print "\n\t//alert(url);\n\tlocation=url;\n\t}\n\t//XLS\n\tfunction selectid_str_init_XLS(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\t";
    if ($_GET['actionadv'] == "exportadv_default") {
        //不用显示或得到SELECTID的值
        print "\turl=\"?action=export_\"+mark+\"_data&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_";
    } else {
        print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t";
        print "\turl=\"?action=export_\"+mark+\"_data&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_";
    }
    print "\n\t//url\n\t//alert(url);\n\tlocation=url;\n\t}\n\t</script>";
    form_begin("form1");
    table_begin($tablewidth);
    switch ($mode) {
        case 'table':
            print_title($common_html['common_html']['tableexport'], 3);
            print "<TR class=TableData>\n";
            print "<TD noWrap align=middle>选择</TD>\n";
            print "<TD width=200>字段描述</TD>\n";
            print "<TD width=200>字段名称</TD>\n";
            print "</TR>\n";
            for ($i = 0; $i < sizeof($columns); $i++) {
                $list = $columns[$i];
                print "<TR class=TableData>\n";
                print "<TD noWrap align=middle width=20><input type=\"checkbox\" checked name=\"selectfield\" value=\"{$list}\"></TD>\n";
                print "<TD>" . $html_etc[$tablename][$list] . "</TD>\n";
                print "<TD>{$list}</TD>\n";
                print "</TR>\n";
                $temp_function = 'selectfield_str';
            }
            break;
        case 'content':
            print_title($common_html['common_html']['contentexport'], 3);
            print "<TR class=TableData>\n";
            print "<TD noWrap align=center width=30>选择</TD>\n";
            print "<TD width=100>字段描述</TD>\n";
            print "<TD width=150>字段名称</TD>\n";
            print "</TR>\n";
            //附加组数据导出--开始
            //print_R($group_filter_Array);
            if ($group_filter != "" && $_GET['actionadv'] != "exportadv_default") {
                //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2
                $TableFieldIndex = $group_filter_Array[0];
                $KeyName = $columns[$TableFieldIndex];
                $PHP_SELF_ARRAY = explode('/', $_SERVER['PHP_SELF']);
                $FILE_SELF_NAME = array_pop($PHP_SELF_ARRAY);
                $FileDirName = array_pop($PHP_SELF_ARRAY);
                //用于PGSQL下面不进行数据较验
                //print $_SESSION['LOGIN_USER_ID'];
                //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2
                //&&$FileDirName=="Teacher" 只有在Teacher目录下面使用 2010-9-25 正常使用
                if ($_GET[$KeyName] != "") {
                    //$ChildTableName = $group_filter_Array[1];
                    //$ChildTableFieldValueIndex = $group_filter_Array[2];
                    //$ChildTableFieldNameIndex = $group_filter_Array[3];
                    //print $KeyName;
                    $附加判断条件Array = explode(',', $_GET[$KeyName]);
                    $附加判断条件 = "'" . join("','", $附加判断条件Array) . "'";
                    $sql = "\n\t\t\t\t\tselect {$ChildTableFieldValue},{$ChildTableFieldName}\n\t\t\t\t\tfrom {$ChildTableName}\n\t\t\t\t\twhere ( {$ChildTableFieldValue} in ({$附加判断条件})\n\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\t{$ChildTableFieldName} in ({$附加判断条件})\n\t\t\t\t\t\t\t)\n\t\t\t\t\torder by {$ChildTableFieldName}";
                    //
                } else {
                    $sql = "select {$ChildTableFieldValue},{$ChildTableFieldName} from {$ChildTableName} order by {$ChildTableFieldName}";
                }
                //print $sql;
//.........这里部分代码省略.........
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:101,代码来源:newai_export.php

示例9: array_flip

        }
    }
    $pro_printfieldlist = array_flip($pro_printfieldlist);
    global $db;
    $sql = "select fieldname,chinese from systemlang where tablename='sellplanmain_detail'";
    $rs = $db->Execute($sql);
    $rs_a = $rs->GetArray();
    foreach ($rs_a as $row) {
        if (isset($pro_printfieldlist[$row['fieldname']])) {
            $pro_printfieldlist[$row['fieldname']] = $row['chinese'];
        }
    }
    $sell_order_print_field = $ini_file['sell_order_print_field'];
    $sell_order_detail_print_field = $ini_file['sell_order_detail_print_field'];
    form_begin("form1", "action=updatedata");
    table_begin(0);
    //print_title("销售单打印纸张宽度");
    //print_tr( "纸张宽度(mm):", "order_print_paper_width", $ini_file[section][order_print_paper_width], 25, 1, "SmallInput", "" );
    print_title("店面销售单打印字段配置");
    print '<tr>
				<td class="TableHeader" nowrap="" >字段</td>
				<td class="TableHeader" nowrap="" colspan="1" >是否显示</td>
				<td class="TableHeader" nowrap="" colspan="1">显示顺序</td>
			</tr>';
    foreach ($printfieldlist as $key => $val) {
        $checked = isset($sell_order_print_field[$key]) ? 'checked' : '';
        print '<tr>
				<td class="TableData" nowrap="" >' . $val . '</td>
				<td class="TableData" nowrap="" colspan="1">
					<input type="checkbox" title=""  maxlength="20"  name="sellfiled[' . $key . ']" value="" ' . $checked . '>
				</td><td class="TableData" nowrap="" colspan="1"><input type="text" title="顺序"  maxlength="20" size="5" name="sellfiledorder[' . $key . ']" value="' . $sell_order_print_field[$key] . '" ' . $checked . '>
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:sellone_print_config_interface.php

示例10: newaiReportSearch

function newaiReportSearch($fields, $list)
{
    global $html_etc, $tablename, $common_html;
    global $db, $return_sql_line, $columns;
    global $_POST, $_GET, $returnmodel, $primarykey_index;
    global $action_submit, $merge, $form_attribute;
    global $showlistfieldlistSearch, $showlistfieldfilterSearch, $showlistfieldfilter2Search;
    global $totalnumber;
    $totalnumber == "" ? $totalnumber = 30 : '';
    $showlistfieldlistArray = explode(',', $showlistfieldlistSearch);
    $showlistfieldfilterArray = explode(',', $showlistfieldfilterSearch);
    print_date_js();
    form_begin($fields['form']['name'], "action", 'GET');
    table_begin("450");
    global $tabletitle;
    print_hidden($_GET['action'] . "_data", "action");
    print_title($html_etc[$tablename][$tabletitle]);
    //print_title("<font color=green>".$common_html['common_html']['totalNumber'].":".$totalnumber."</font>");
    print_title($common_html['common_html']['totalNumber'] . ":" . $totalnumber);
    for ($i = 0; $i < sizeof($showlistfieldlistArray); $i++) {
        $fieldIndex = $showlistfieldlistArray[$i];
        $fieldName = $columns[$fieldIndex];
        $fieldText = $html_etc[$tablename][$fieldName];
        $mode = $showlistfieldfilterArray[$i];
        switch ($mode) {
            case '':
                break;
            case 'input':
                print_tr($fieldText . ":", $fieldName, '', $fields['other']['inputsize'], $fields['other']['inputcols'], $fields['other']['class'], $notnulltext, 'text', '', $i + 1);
                break;
            case 'date':
                print_report_date($fieldText . ":", $fieldName, '', $fields['other']['inputsize'], $fields['other']['inputcols'], $fields['other']['class'], $notnulltext, 'text', '', $i + 1);
                break;
        }
    }
    print_submit($common_html['common_html']['reportsearch'], 3, "");
    print "<TR><TD class=TableControl noWrap align=middle  colspan=\"3\">\n";
    print "<div align=\"center\">\n<INPUT class=SmallButton title=" . $common_html['common_html']['reportsearch'] . " type=submit value=\"" . $common_html['common_html']['reportsearch'] . "\" name=button>\n ";
    print "</TD></TR>\n";
    table_end();
    form_end();
}
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:42,代码来源:newai_report.php

示例11: viewChildTableList

function viewChildTableList($subtable, $parent_value)
{
    global $db;
    $maintable_key = $subtable['maintable_key'];
    $table_title = $subtable['subtable_title'];
    $tablename2 = $subtable['subtable_name'];
    $childkey2 = $subtable['subtable_key'];
    $where2 = $subtable['subtable_where'];
    $where2 = str_replace("(", "(", $where2);
    $where2 = str_replace(")", ")", $where2);
    $showlistfieldlist2 = $subtable['subtable_showlistfieldlist'];
    $columns2 = returntablecolumn($tablename2);
    $html_etc2 = returnsystemlang($tablename2);
    $showlistfieldlistArray2 = explode(",", $showlistfieldlist2);
    $iniFilename = "Model/" . $tablename2 . "_newai.ini";
    if (!file_exists($iniFilename)) {
        $iniFilename = "../JXC/Model/" . $tablename2 . "_newai.ini";
    }
    if (!file_exists($iniFilename)) {
        $iniFilename = "../CRM/Model/" . $tablename2 . "_newai.ini";
    }
    if (!file_exists($iniFilename)) {
        $iniFilename = "../Framework/Model/" . $tablename2 . "_newai.ini";
    }
    $file_ini2 = parse_ini_file($iniFilename, true);
    $org_showlistfieldlist = explode(",", $file_ini2['view_default']['showlistfieldlist']);
    $org_showlistfieldfilter = explode(",", $file_ini2['view_default']['showlistfieldfilter']);
    $showlistfieldfilterArray2 = array();
    for ($i = 0; $i < sizeof($org_showlistfieldlist); $i++) {
        if (in_array($org_showlistfieldlist[$i], $showlistfieldlistArray2)) {
            $showlistfieldfilterArray2[$org_showlistfieldlist[$i]] = $org_showlistfieldfilter[$i];
        }
    }
    //构建SQL语句
    $SQLText = "";
    for ($i = 0; $i < sizeof($showlistfieldlistArray2); $i++) {
        $listIndex = $showlistfieldlistArray2[$i];
        $listIndexName = $columns2[$listIndex];
        if ($SQLText != "") {
            $SQLText .= ",";
        }
        $SQLText .= $listIndexName;
    }
    if (is_array($parent_value)) {
        $childkey2Array = explode(",", $childkey2);
        $mainkey2Array = explode(",", $maintable_key);
        $SQL_Select = "select {$SQLText} from {$tablename2} where 1=1 ";
        $i = 0;
        foreach ($mainkey2Array as $row) {
            $SQL_Select = $SQL_Select . "and " . $childkey2Array[$i] . "='" . $parent_value[$row] . "' ";
            $i++;
        }
    } else {
        $SQL_Select = "select {$SQLText} from {$tablename2} where {$childkey2} = '" . $parent_value . "'";
    }
    if ($where2 != '') {
        $where2 = str_replace(":", "=", $where2);
        $where2 = str_replace("\\", "", $where2);
        $SQL_Select .= " and " . $where2;
    }
    $rs = $db->Execute($SQL_Select);
    $rs_a = $rs->GetArray();
    //print_R($rs_a);print_R($showlistfieldlistArray2);
    print "<tr ><td colspan=6 nowrap width=100%>\n";
    table_begin("100%");
    //标题显示部分
    if ($table_title != "") {
        $url_filename = $tablename2 . "_newai.php";
        if (file_exists("../JXC/" . $url_filename)) {
            $url_filename = "../JXC/" . $url_filename;
        } else {
            if (file_exists("../CRM/" . $url_filename)) {
                $url_filename = "../CRM/" . $url_filename;
            } else {
                $url_filename = "";
            }
        }
        if ($url_filename != '') {
            $table_title = "<a href='{$url_filename}' target='_blank'>{$table_title}</a>";
        }
        print "<tr><td class=TableHeader align=center colspan=" . sizeof($showlistfieldlistArray2) . ">{$table_title}</td></tr>";
    }
    print "<tr class=TableContent>\n";
    for ($i = 0; $i < sizeof($showlistfieldlistArray2); $i++) {
        $listIndex = $showlistfieldlistArray2[$i];
        $listIndexName = $columns2[$listIndex];
        $listFilter = $showlistfieldfilterArray2[$listIndex];
        $listFilterArray = explode(":", $listFilter);
        if (stristr($listFilterArray[0], "tablefilter") && $listFilterArray[1] == $tablename2) {
            $TempColumns = returntablecolumn($listFilterArray[1]);
            $showText = $html_etc2[$tablename2][$TempColumns[$listFilterArray[3]]];
        } else {
            $showText = $html_etc2[$tablename2][$listIndexName];
        }
        print "<td nowrap>" . $showText . "</td>";
    }
    print "</tr>";
    $allnum = array();
    $allmoney = array();
    //数据窗口部分
//.........这里部分代码省略.........
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:101,代码来源:newai_view.php

示例12: _query


//.........这里部分代码省略.........
     //对MYSQL系统进行性能监控 2010-9-30 15:09
     $sql = $sql_VALUE;
     $sqlTEXT2010 = $sql;
     $开始时间 = time();
     $mysql_query = mysql_query($sql, $this->_connectionID);
     $mysql_error = mysql_error();
     $mysql_errno = mysql_errno();
     //print $mysql_error;
     if (function_exists("iconv")) {
         $mysql_error = iconv('UTF-8', 'GB2312', $mysql_error);
     }
     //print $mysql_error;
     if (!$mysql_error) {
         //放到最下面进行执行
     } else {
         $sql = trim($sql);
         global $SYSTEM_DEBUG_SQL;
         if (strlen($sql) > 6 && $SYSTEM_DEBUG_SQL == 1 && !$rez) {
             $mysql_error = ereg_replace("Table", "数据表:", $mysql_error);
             $mysql_error = ereg_replace("doesn't exist", "不存在.", $mysql_error);
             $mysql_error = ereg_replace("Duplicate entry", "以下数据要求是唯一性的,但发生重复,该字段的值为:", $mysql_error);
             $mysql_error = ereg_replace("for key", "重复次数:", $mysql_error);
             $mysql_error = ereg_replace("Unknown column", "不存在的列", $mysql_error);
             $mysql_error = ereg_replace("in 'where clause'", "在WHERE判断语句中.", $mysql_error);
             //$mysql_error = ereg_replace("Table","数据表",$mysql_error);
             //$mysql_error = ereg_replace("Table","数据表",$mysql_error);
             $mysql_error = "错误代码:" . $mysql_errno . " 解释:" . $mysql_error;
             $fileVersion = @file(ROOT_DIR . "/general/EDU/Interface/EDU/version.ini");
             $fileVersionNumber = $fileVersion[0];
             $errorsql = "insert into systemerrorsql values('','" . $_SERVER['REQUEST_URI'] . "','" . ereg_replace("'", "&#039;", $sqlTEXT2010) . "','" . ereg_replace("'", "&#039;", $mysql_error) . "','" . $_SERVER['SERVER_NAME'] . "_" . $fileVersionNumber . "','" . date("Y-m-d H:i:s") . "');";
             //print $errorsql;
             mysql_query($errorsql, $this->_connectionID);
             page_css("向软件开发商报告错误");
             table_begin("600");
             print_title("警告:发生SQL语句错误信息!点击按钮向软件开发商报告错误");
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;报告时间</TD>\n\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . date("Y-m-d H:i:s") . "</TD>\n\t\t\t\t\t\t</TR>";
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;错误类型</TD>\n\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;SQL语句出现错误</TD>\n\t\t\t\t\t\t</TR>";
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;文件地址</TD>\n\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $_SERVER['PHP_SELF'] . "</TD>\n\t\t\t\t\t\t</TR>";
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;SQL语句</TD>\n\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $sql . "</TD>\n\t\t\t\t\t\t</TR>";
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=left colSpan=1 width=30%>&nbsp;错误信息</TD>\n\t\t\t\t\t\t<TD class=TableData align=left colSpan=2>&nbsp;" . $mysql_error . "</TD>\n\t\t\t\t\t\t</TR>";
             //$sqlTEXT2010 = ereg_replace("'","____",$sqlTEXT2010);
             $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010);
             $sqlTEXT2010 = ereg_replace("=", "+", $sqlTEXT2010);
             //$mysql_error = ereg_replace("'","____",$mysql_error);
             $mysql_error = ereg_replace("=", "+", $mysql_error);
             $mysql_error = ereg_replace("=", "+", $mysql_error);
             $FILE_PATH = $_SERVER['REQUEST_URI'];
             $FILE_PATH = ereg_replace("=", "+", $FILE_PATH);
             $FILE_PATH = ereg_replace("=", "+", $FILE_PATH);
             print "<TR>\n\t\t\t\t\t\t<TD class=TableContent align=center colSpan=3>&nbsp;<input type=button name=ButtonName class=SmallButton value='向软件开发商报告错误' OnClick=\"location='http://www.dandian.net/tryout/SunshineOACRM/errorsql.php?" . base64_encode("fffffff=xxxxxxxx&SDDDD=XXXX&FILE_PATH=" . $FILE_PATH . "&SERVER_NAME=" . $_SERVER['SERVER_NAME'] . "_" . $fileVersionNumber . "&SQL_CONTENT={$sqlTEXT2010}&ERROR_INFOR={$mysql_error}&DATE_TIME=" . date("Y-m-d H:i:s") . "&fffffff=xxxxxxxx") . "'\"></TD>\n\t\t\t\t\t\t</TR>";
             table_end();
             //print_R($_SERVER);
             exit;
         }
     }
     #########################################################################################################
     //SQL语句解析函数_应用于消息中心($sql,$操作记录编号);
     #########################################################################################################
     //对MYSQL系统进行性能监控 2010-9-30 15:09
     $结束时间 = time();
     $执行时间 = $结束时间 - $开始时间;
     if ($sql != "show status" && $sql != "set names gbk" && $执行时间 > 2) {
         $sqlTEXT = "show status";
         $result = mysql_query($sqlTEXT, $this->_connectionID);
         while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
             $KEYNAME = $row['Variable_name'];
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:67,代码来源:adodb-mysql.inc.php

示例13: BaseStatistics

function BaseStatistics($showlistfieldlist1Array, $action_model_2)
{
    global $html_etc, $common_html, $tablename, $tabletitle;
    global $db, $columns;
    global $_POST, $_GET, $primarykey_index;
    //获取系统显示的色彩信息
    $ColorArray = returnColorArray();
    //初始化信息
    $USER_Field = $showlistfieldlist1Array[0];
    $DEPT_Field = $showlistfieldlist1Array[1];
    $DATE_Field = $showlistfieldlist1Array[2];
    $FIELD_Field = $showlistfieldlist1Array[3];
    $FIELD_LIST = explode(':', $FIELD_Field);
    $Action_Model = $FIELD_LIST[0];
    switch ($Action_Model) {
        case 'NUM':
            //array_shift($FIELD_LIST);
            $SQL_Text = "Count({$FIELD_LIST['1']}) AS Number";
            break;
        case 'SUM':
            break;
    }
    $_GET['Year'] == "" ? $_GET['Year'] = Date("Y") : '';
    $Year = $_GET['Year'];
    if ($DATE_Field == "BaoBeiDate") {
        $SQL_ADD1 = "IsFor AS IsFor,";
        $SQL_ADD2 = ",IsFor";
        $SQL_ADD3 = " and IsFor = 'on' ";
        $SQL_ADD4 = "";
    } else {
        $SQL_ADD1 = "";
        $SQL_ADD2 = "";
        $SQL_ADD3 = "";
        $SQL_ADD4 = "";
    }
    $sql = "select Date_Format({$DATE_Field},'%Y-%c') AS Date,\n\t\tDate_Format({$DATE_Field},'%Y') AS Year,\n\t\t\t{$SQL_ADD1}\n\t\t\t{$SQL_Text},\n\t\t\t{$USER_Field} AS USER_Field,\n\t\t\t{$DEPT_Field} AS DEPT_Field\n\t\t\tfrom {$tablename}\n\t\t\tgroup by {$DATE_Field},{$USER_Field},{$DEPT_Field} {$SQL_ADD2}\n\t\t\thaving Year='{$Year}' {$SQL_ADD3}\n\t\t\torder by DEPT_Field\n\t\t\t";
    // having CommunicationNeeds_SureDate != null
    //$SQL = "select Date_Format($fieldName,'%c') AS $fieldName,Sum($sum_index) as sum,Count($fieldName) as num from $tablename group by $fieldName";
    //print $sql;
    $rs = $db->CacheExecute(150, $sql);
    $rs_a = $rs->GetArray();
    for ($i = 0; $i < sizeof($rs_a); $i++) {
        $list = $rs_a[$i];
        $DateValue = $list['Date'];
        $UserValue = $list['USER_Field'];
        $DeptValue = $list['DEPT_Field'];
        $NewArray['USER'][$UserValue][$DateValue] += $list['Number'];
        $NewArray['DEPT'][$DeptValue][$DateValue] += $list['Number'];
        $NewArray['DEPT_YEAR'][$DeptValue][$Year] += $list['Number'];
        $NewArray['USER_YEAR'][$UserValue][$Year] += $list['Number'];
        $NewArray['USER_DEPT'][$UserValue] = $DeptValue;
    }
    //print_R($NewArray['DEPT']);
    table_begin("900");
    $Title_URL .= "<font color=white title='客户信息统计:" . $Year . "年'>客户信息统计:" . $Year . "年</font> ";
    $Title_URL .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n\t\t\t\t<a href=\"?Year=" . ($Year - 1) . "&action_model={$action_model_2}\" title=\"点击此按钮,来确定不同的年份进行统计\"><img src=\"../../Framework/images/arrow_l.gif\" border></a>\n\t\t\t\t<a href=\"?Year=" . ($Year + 1) . "&action_model={$action_model_2}\" title=\"点击此按钮,来确定不同的年份进行统计\"><img src=\"../../Framework/images/arrow_r.gif\" border></a>\n\t\t\t\t";
    print_title("<font color=white title='按 \"" . $html_etc[$tablename][$DATE_Field . "_STS"] . "\" 进行信息统计'>[" . $html_etc[$tablename][$DATE_Field . "_STS"] . "]</font>" . $Title_URL, 15);
    //标题栏--用户区域
    print "<TR class=TableContent>\n";
    print "<TD nowrap title='用户列表'>用户列表</TD>\n";
    for ($i = 1; $i <= 12; $i++) {
        $HeaderName = Date("Y-n", mktime(0, 0, 0, $i, Date("d"), $Year));
        print "<TD nowrap title='显示" . $HeaderName . "月份数据统计信息'>{$HeaderName}</TD>\n";
    }
    print "<TD nowrap>" . $Year . "年</TD>\n";
    print "</TR>\n";
    //数据区域--用户区域
    $USER_LIST = @array_keys($NewArray['USER']);
    for ($i = 0; $i < sizeof($USER_LIST); $i++) {
        $USER_TEXT = $USER_LIST[$i];
        $DEPT_TEXT = $NewArray['USER_DEPT'][$USER_TEXT];
        $USER_TEXT_NAME = returntablefield("user", "USER_NAME", $USER_TEXT, "NICK_NAME");
        $DEPT_TEXT_NAME = returntablefield("department", "DEPT_ID", $DEPT_TEXT, "DEPT_NAME");
        print "<TR class=TableContent>\n";
        print "<TD nowrap class=TableData><font color=black title=\"" . $USER_TEXT_NAME . "一年统计数量:" . $NewArray['USER_YEAR'][$USER_TEXT][$Year] . "\">" . $USER_TEXT_NAME . "[" . $DEPT_TEXT_NAME . "]</font>&nbsp;</TD>\n";
        for ($k = 1; $k <= 12; $k++) {
            $HeaderName = Date("Y-n", mktime(0, 0, 0, $k, Date("d"), $Year));
            $HeaderName2 = Date("Y-m", mktime(0, 0, 0, $k, Date("d"), $Year));
            if ($NewArray['USER'][$USER_TEXT][$HeaderName] != "") {
                $base64_string = "action=init_default_search&searchvalue={$HeaderName2}&searchfield={$DATE_Field}&{$USER_Field}={$USER_TEXT}";
                $base64_url = base64_encode($base64_string);
                $Element = "<a href=\"crm_customer_newai.php?{$base64_url}\" target=_blank>" . $NewArray['USER'][$USER_TEXT][$HeaderName] . "</a>";
            } else {
                $Element = "";
            }
            print "<TD nowrap class=TableData>" . $Element . "&nbsp;</TD>\n";
        }
        if ($NewArray['USER_YEAR'][$USER_TEXT][$Year] != "") {
            $base64_string = "action=init_default_search&searchvalue={$Year}&searchfield={$DATE_Field}&{$USER_Field}={$USER_TEXT}";
            $base64_url = base64_encode($base64_string);
            $Element = "<a href=\"crm_customer_newai.php?{$base64_url}\" target=_blank>" . $NewArray['USER_YEAR'][$USER_TEXT][$Year] . "</a>";
        } else {
            $Element = "";
        }
        print "<TD nowrap class=TableData><font color=black title='" . $USER_TEXT_NAME . "用户" . $Year . "年客户数量:" . $NewArray['USER_YEAR'][$USER_TEXT][$Year] . "'>" . $Element . "</font>&nbsp;</TD>\n";
        print "</TR>\n";
    }
    //标题栏--部门区域
    print "<TR class=TableContent>\n";
    print "<TD nowrap title='部门列表'>部门列表</TD>\n";
//.........这里部分代码省略.........
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:101,代码来源:newai_statistics.php

示例14: mysql_close

@mysql_close();
if ($_POST['connect']) {
    if (@mysql_connect($servername, $dbusername, $dbpassword) && @mysql_select_db($dbname)) {
        echo "数据库连接成功!";
        mysql_close();
    } else {
        echo mysql_error();
    }
} else {
    if ($_POST['dobackup']) {
        $filepath = "../databackup/";
        if (!is_dir($filepath)) {
            mkdir($filepath);
        }
        print "<BR>";
        table_begin(650);
        print_title("数据库备份提示");
        print "<tr class=Tabledata><td align=center><font color=red>";
        if (empty($_POST[table])) {
            print "请选择欲备份的数据表";
        } else {
            if (!mysql_connect($hostname, $userdb_name, $userdb_pwd)) {
                exit("数据库连接失败");
            }
            if (!mysql_select_db($userdb)) {
                exit("选择数据库失败");
            }
            $table = array_flip($_POST['table']);
            $filehandle = @fopen($filepath . $_POST['path'], "w");
            if ($filehandle) {
                $result = mysql_query("SHOW tables");
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:31,代码来源:system_backup.php

示例15: newai_import

function newai_import($fields, $mode = 'table')
{
    global $common_html, $html_etc;
    global $return_sql_line, $db;
    global $columns;
    //print_R($columns);
    global $showlistfieldlist, $showlistfieldlist_key;
    global $foreignkey, $uniquekey, $primarykey;
    $tablename = $fields['table']['name'];
    $SQL = $fields['sql']['SQL'];
    $init = explode('_', $_GET['action']);
    $mark = $init[1];
    if ($uniquekey == '') {
        $uniquekey = $primarykey;
    }
    //print $uniquekey;
    print "<FORM name=form1 action=\"?action=import_" . $mark . "_data\" method=post encType=multipart/form-data>\n";
    print "<input type=hidden name=hidden_str value=''>\n";
    print "<script >";
    print "\nfunction temp_function()\n{\n\n\tvar selectid_str=\"\";\n\t/*\n\tfor(i=0;i<document.all(\"selectid\").length;i++)\n\t\t{\n\n\t\tel=document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{  val=el.value;\n         selectid_str+=val + \",\";\n\t\t}\n\t}*/\n\tform1.hidden_str.value=selectid_str;\n\tform1.submit();\n\tvar sbtn=document.getElementsByName('submitbtn');\n\tfor(i=0;i<sbtn.length;i++)\n\t{\n\t\tsbtn[i].value='提交中';\n\t\tsbtn[i].disabled=true;\n\t}\n}\n";
    print "</script>";
    global $tablewidth, $primarykey, $primarykey_index;
    $tablewidth = $tablewidth != "" ? $tablewidth : 450;
    table_begin($tablewidth);
    print_title("数据导入操作,唯一索引限制,多个表示不能同时重复", 3);
    //print_R($common_html['common_html']['contentimport']);
    if ($foreignkey != "") {
        $foreignkey_array = explode(':', $foreignkey);
        $columns_parent = returntablecolumn($foreignkey_array[1]);
        print_R($columns_parent);
        print_select('选择考试名称', $columns[(string) $foreignkey_array[3]], $value, $foreignkey_array[1], $columns_parent[(string) $foreignkey_array[3]], $columns_parent[(string) $foreignkey_array[2]], $colspan = 3, $columns_parent[(string) $foreignkey_array[4]]);
        print_hidden($columns[(string) $foreignkey_array[3]], 'foreignkey');
    }
    print "<TR class=TableData>\n";
    print "<TD noWrap align=middle width=50>唯一索引:</TD>\n";
    print "<TD colspan=2>";
    $uniquekey_array = explode(',', $uniquekey);
    $FieldList = array();
    for ($i = 0; $i < sizeof($uniquekey_array); $i++) {
        $uniquekey_KEY = $uniquekey_array[$i];
        if ($uniquekey_KEY != "") {
            $uniquekey_KEY_ADD = explode(':', $uniquekey_KEY);
            if ($uniquekey_KEY_ADD[1] == "userid") {
                $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)";
            } else {
                if ($uniquekey_KEY_ADD[1] == "username") {
                    $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)";
                } else {
                    if ($uniquekey_KEY_ADD[1] == "datetime") {
                        $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)";
                    } else {
                        $tablenamelang = returnsystemlang($tablename);
                        $FieldList[] = $tablenamelang[$tablename][$columns["" . $uniquekey_KEY_ADD[0] . ""]];
                    }
                }
            }
        }
    }
    //print_R($uniquekey_array);
    //输出不较验主键时的选择列表
    $唯一字段显示文本 = join(',', $FieldList);
    print $唯一字段显示文本;
    print "</TD>\n";
    print "</TR>\n";
    global $importgroup;
    if ($importgroup != "") {
        //print $importgroup;
        print_title('选择要导入的组', 3);
        $importgroupArray = explode(':', $importgroup);
        $showfieldIndex = $importgroupArray[0];
        $showFieldName = $columns[$showfieldIndex];
        $showfieldTableName = $importgroupArray[1];
        $showfieldColumns = returntablecolumn($showfieldTableName);
        $showfieldIndexValue = $importgroupArray[2];
        $showfieldIndexName = $importgroupArray[3];
        $showfieldIndexValue = $showfieldColumns[$showfieldIndexName];
        $showfieldIndexName = $showfieldColumns[$showfieldIndexName];
        print_select('选择要导入的组:', $showFieldName, $value = '', $showfieldTableName, $showfieldIndexValue, $showfieldIndexName, $colspan = 2, $setfieldname = '', $setfieldvalue = '', $setfieldboolean = '');
    }
    /*
    if($tablename == 'customer'){
    	print_title('请您先<a style="color:red;" href="xls_template/客户信息模板.xls">下载模板</a>,编辑完成再进行导入。',3);
    }elseif($tablename == 'supply'){
    	print_title('请您先<a style="color:red;" href="xls_template/供应商信息模板.xls">下载模板</a>,编辑完成再进行导入。',3);
    }elseif($tablename == 'product'){
    	print_title('请您先<a style="color:red;" href="xls_template/商品信息模板.xls">下载模板</a>,编辑完成再进行导入。',3);
    }else{
    	print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板',3);
    }
    */
    print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板', 3);
    print "<TR class=TableData height=50>\n";
    print "<TD noWrap align=middle >EXCEL格式文件</TD>\n";
    print "<TD colspan=2><input name='uploadfileXLS' type=file size=25 class=SmallInput></TD>\n";
    print "</TR>\n";
    //print_title('导入CSV格式数据文件',3);
    //print "<TR class=TableData height=50>\n";
    //print "<TD noWrap align=middle >MS CSV文件</TD>\n";
    //print "<TD colspan=2><input name='uploadfile' type=file size=25 class=SmallInput></TD>\n";
    //print "</TR>\n";
//.........这里部分代码省略.........
开发者ID:shesai0519,项目名称:sunshineCRM,代码行数:101,代码来源:newai_import.php


注:本文中的table_begin函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。