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


PHP nuRunQuery函数代码示例

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


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

示例1: nuBuildTable

function nuBuildTable($J)
{
    $h = '';
    $h .= "<table>";
    $h .= "<tr>";
    $h .= "<th class='id'>ID</th>";
    for ($i = 0; $i < count($J->objects); $i++) {
        $w = $J->objects[$i]->width . 'px';
        $v = $J->objects[$i]->title;
        $h .= "<th class='s{$i}'>{$v}</th>";
    }
    $h .= "</tr>";
    $T = nuRunQuery("SELECT * FROM {$J->records}");
    while ($R = db_fetch_row($T)) {
        $h .= "<tr>";
        $h .= "<td class='id'>" . $R[0] . "</td>";
        for ($i = 0; $i < count($J->objects); $i++) {
            $w = $J->objects[$i]->width . 'px';
            $v = $R[$i + 1];
            $h .= "<td class='s{$i}'>{$v}</td>";
        }
        $h .= "</td>";
        $h .= "</tr>";
    }
    $h .= "</table>";
    return $h;
}
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:27,代码来源:nurunprintbrowse.php

示例2: nuGetFieldValue

 private function nuGetFieldValue($O)
 {
     $type = '';
     $value = '';
     if (strtoupper(substr($O->fieldName, 0, 4)) == 'SUM(') {
         $type = 's';
         $field = substr($O->fieldName, 4, -1);
     }
     if (strtoupper(substr($O->fieldName, 0, 8)) == 'AVERAGE(') {
         $type = 'p';
         $fields = explode(',', substr($O->fieldName, 8, -1));
     }
     if ($type == '') {
         //-- normal value
         //Add the 'is_array' check by SG 8th May 2015
         if (is_array($this->ROW)) {
             if (array_key_exists($O->fieldName, $this->ROW)) {
                 $v = $this->nuGetFormatting($O);
                 $value = mb_convert_encoding($v['V'], "WINDOWS-1252", "UTF-8");
             }
         }
     } else {
         //-- summed value
         $groups = array();
         $where = '';
         if ($type == 'p') {
             $count = 'SUM(nu_sum_' . trim($fields[0]) . ') AS the_sum_a, SUM(nu_sum_' . trim($fields[1]) . ') AS the_sum_b';
         } else {
             $count = 'SUM(nu_sum_' . trim($field) . ') AS the_sum_a';
         }
         for ($i = 3; $i <= $this->group; $i++) {
             $groups[] = $this->LAY->groups[$i]->sortField . " = '" . str_replace("'", "\\'", $this->ROW[$this->LAY->groups[$i]->sortField]) . "'";
             $where = ' WHERE ';
         }
         $sql = "SELECT {$count} FROM {$this->TABLE_ID}" . "_nu_summary {$where} " . implode(' AND ', $groups);
         $t = nuRunQuery($sql);
         $r = db_fetch_row($t);
         if ($r[1] == 0 and $type == 'p') {
             $value = 0;
         } else {
             if ($type == 'p') {
                 //                    $value  = ($r[0] / $r[1]) * 100;
                 $value = $r[0] / $r[1];
             } else {
                 $value = $r[0];
             }
         }
     }
     if ($O->format != '') {
         //-- format value
         $format = nuTextFormats();
         $datatype = $format[$O->format]->type;
         if ($datatype == 'date') {
             if ($value != '0000-00-00' && $value != '') {
                 $value = date($format[$O->format]->phpdate, strtotime($value));
             } else {
                 $value = '';
             }
         }
         if ($datatype == 'number') {
             $value = number_format($value, $format[$O->format]->format, $format[$O->format]->decimal, $format[$O->format]->separator);
         }
     }
     return $value;
 }
开发者ID:ktla,项目名称:nuBuilderPro,代码行数:65,代码来源:nurunpdf.php

示例3: set_include_path

<?php

/*
** File:           runCronProcedure_nu2.php
** Author:         nuSoftware
** Created:        2007/04/26
** Last modified:  2009/07/15
**
** Copyright 2004, 2005, 2006, 2007, 2008, 2009 nuSoftware
**
** This file is part of the nuBuilder source package and is licensed under the
** GPLv3. For support on developing in nuBuilder, please visit the nuBuilder
** wiki and forums. For details on contributing a patch for nuBuilder, please
** visit the `Project Contributions' forum.
**
**   Website:  http://www.nubuilder.com
**   Wiki:     http://wiki.nubuilder.com
**   Forums:   http://forums.nubuilder.com
*/
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
$dir = $argv[1];
$report = $argv[2];
include "../{$dir}/database.php";
include 'common.php';
$T = nuRunQuery("SELECT * FROM zzsys_activity WHERE sat_all_code = '{$report}'");
$A = db_fetch_object($T);
eval($A->sat_procedure_code);
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:27,代码来源:runCronProcedure_nu2.php

示例4: buildHTMLForSubform

 private function buildHTMLForSubform($CRLF, $TAB, $fieldName, $fieldTitle, $blankRows, $objectID)
 {
     if (!$this->displayThisObject) {
         return '';
     } else {
         $this->parentForm->subformNames[] = $this->objectProperty['sob_all_name'];
         $this->parentForm->subformTabs[] = $this->parentForm->formTabNames[$this->objectProperty['sob_all_tab_title']];
     }
     $format = textFormatsArray();
     if ($this->objectProperty['sob_all_on_change'] != '') {
         $OnChange = 'onchange="' . $this->objectProperty["sob_all_on_change"] . '" ';
     }
     $this->CRLF = $CRLF;
     $this->TAB = $TAB;
     $hGap = 3;
     //gap between fields
     $vHeight = 23;
     //row height
     $vTitleHeight = $this->objectProperty['sob_subform_title_height'] * 16;
     //row height
     $vTop = 10;
     //row height
     $sfDimensions = array();
     $fldDimensions = array();
     $t = nuRunQuery("SELECT * FROM zzsys_object WHERE sob_zzsys_form_id = '" . $this->objectProperty['zzsys_object_id'] . "' ORDER BY sob_all_column_number, sob_all_order_number");
     while ($r = db_fetch_array($t)) {
         $objectLength = $r['sob_' . $r['sob_all_type'] . '_length'];
         // eg. text objects are 'sob_text_length'
         if ($r['sob_all_type'] == 'lookup') {
             $objectLength = $r['sob_lookup_code_length'];
             // code length
             if ($r['sob_lookup_no_description'] != '1') {
                 $objectLength = $objectLength + 0.5 + $r['sob_lookup_description_length'];
                 // description length
             }
         }
         if ($r['sob_all_type'] == 'text') {
             if ($format[$r['sob_text_format']]->type == 'date') {
                 $objectLength = $objectLength + 1.5;
                 // date button length
             }
         }
         $fldDimensions[$r['sob_all_name']]->type = $r['sob_all_type'];
         $fldDimensions[$r['sob_all_name']]->columnAlign = 'left';
         if ($r['sob_all_type'] == 'text') {
             $fldDimensions[$r['sob_all_name']]->columnAlign = $r['sob_text_align'];
         }
         if ($r['sob_all_type'] == 'display') {
             $fldDimensions[$r['sob_all_name']]->columnAlign = $r['sob_display_align'];
         }
         $fldDimensions[$r['sob_all_name']]->columnTitle = $r['sob_all_title'];
         $fldDimensions[$r['sob_all_name']]->column = $r['sob_all_column_number'];
         $fldDimensions[$r['sob_all_name']]->leftCoordinate = round($sfDimensions[$r['sob_all_column_number']]->columnWidth);
         $fldDimensions[$r['sob_all_name']]->columnWidth = $objectLength * 16 + $hGap;
         $sfDimensions[$r['sob_all_column_number']]->columnWidth = round($sfDimensions[$r['sob_all_column_number']]->columnWidth) + $fldDimensions[$r['sob_all_name']]->columnWidth;
         $colHeight = round($sfDimensions[$r['sob_all_column_number']]->columnHeight);
         if ($colHeight == 0) {
             $sfDimensions[$r['sob_all_column_number']]->columnHeight = $vHeight;
             $colHeight = $sfDimensions[$r['sob_all_column_number']]->columnHeight;
         }
         if ($r['sob_all_type'] == 'textarea' and $colHeight < $r['sob_textarea_height'] * 16) {
             $sfDimensions[$r['sob_all_column_number']]->columnHeight = $r['sob_textarea_height'] * 16;
         }
     }
     $longest = '';
     foreach ($sfDimensions as $key => $value) {
         // get longest row
         if ($value->columnWidth > $longest) {
             $longest = $value->columnWidth;
         }
         $rowHeight = $rowHeight + $value->columnHeight;
     }
     $prntCheckBox = $this->objectProperty['sob_subform_delete_box'] == '1' and $this->objectProperty['sob_subform_read_only'] != '1';
     if ($prntCheckBox) {
         //add room for the delete tick box
         $longest = $longest + $vHeight;
     } else {
         $longest = $longest + 20;
     }
     //add scroll bar
     $sfWidth = $longest + 20;
     $sfLeft = $this->objectProperty['sob_subform_left'];
     //add height of subform title + column title(s) to overall height
     $sfHeight = $this->objectProperty['sob_subform_height'] * 16 - $this->objectProperty['sob_subform_title_height'] * 16 - 100;
     $sfTop = $this->objectProperty['sob_subform_top'];
     if ($this->objectProperty['sob_subform_width'] == 0) {
         $scsfWidth = $sfWidth + 10;
     } else {
         $scsfWidth = $this->objectProperty['sob_subform_width'];
     }
     $scsfHeight = $sfHeight - 20;
     $scsfHeight = $sfHeight - 16;
     //changed from -10 to -16
     $s = "<div name='sf_title{$fieldName}' id='sf_title{$fieldName}' class='selected' style='text-align:left;position:absolute;height:20;top:{$sfTop};left:{$sfLeft};width:{$sfWidth};'>{$fieldTitle}</div>{$CRLF}";
     $sfTop = $sfTop + 20;
     $s = $s . "{$TAB}<div name='{$fieldName}' id='{$fieldName}' class='selected' style='position:absolute;overflow:auto;width:{$scsfWidth};height:{$scsfHeight};top:{$sfTop};left:{$sfLeft};'>{$CRLF}";
     $s = $s . "{$TAB}   <div name='title{$fieldName}' id='title{$fieldName}' style='position:absolute;top:0;left:0;background:#6D7B8D'>{$CRLF}";
     // build subform column titles
     $columnTop = 0;
     $columnNumber = '';
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:101,代码来源:form.php

示例5: array

<?php

require_once 'nucommon.php';
if (isset($_GET['p'])) {
    $values = array($_GET['p']);
    $sql = "SELECT zzzsys_php_id, slp_php FROM zzzsys_php WHERE slp_code = ? AND slp_nonsecure = '1' ";
    $rs = nuRunQuery($sql, $values);
    $num = db_num_rows($rs);
    if ($num == 1) {
        $r = db_fetch_object($rs);
        $r->slp_php = nuGetSafePHP('slp_php', $r->zzzsys_php_id, $r->slp_php);
        $e = nuReplaceHashes($r->slp_php, $_GET);
        eval($e);
    } else {
        echo "Request is not allowed";
    }
} else {
    echo "Request format is invalid";
}
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:19,代码来源:nucall.php

示例6: hasDeleteBox

function hasDeleteBox($pParentID)
{
    $t = nuRunQuery("SELECT * FROM zzsys_object WHERE zzsys_object_id = '{$pParentID}'");
    $r = db_fetch_object($t);
    return $r->sob_subform_delete_box == '1';
}
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:6,代码来源:formlookup.php

示例7: mysqlbackup

function mysqlbackup($host, $dbname, $uid, $pwd, $output, $structure_only)
{
    //this function creates a text file (or output to a HTTP connection), that when parsed through MYSQL's telnet client, will re-create the entire database
    //Parameters:
    //    $host: usually "localhost" but depends on where the MySQL database engine is mounted
    //    $dbname : The MySQL database name
    //    $uid : the database's username (not your account's), leave blank if none is required
    //    $pwd : the database's password
    //    $output : this is the complete filespec for the output text file, or if you want the result SQL to be sent back to the browser, leave blank.
    //    $structure_only : set this to true if you want just the schema of the database (not the actual data) to be output.
    // **************
    // IMPORTANT: If you use this function, for personal or commercial use, AND you feel an overwhelming sense of gratitude that someone actually took the time and wrote it,
    // immediately go to your paypal account and send me $10 with a small comment of how and how much it helped! Set the payment recipient to woodystanford@yahoo.com .
    // **************
    if (strval($output) != "") {
        $fptr = fopen($output, "w");
    } else {
        $fptr = false;
    }
    //connect to MySQL database
    $con = mysql_connect($host, $uid, $pwd);
    $db = mysql_select_db($dbname, $con);
    //open back-up file ( or no file for browser output)
    //set up database
    out($fptr, "create database {$dbname};\n\n");
    //enumerate tables
    $res = mysql_list_tables($dbname);
    $nt = mysql_num_rows($res);
    for ($a = 0; $a < $nt; $a++) {
        $row = mysql_fetch_row($res);
        $tablename = $row[0];
        //start building the table creation query
        $sql = "create table {$tablename}\n(\n";
        $res2 = nuRunQuery("SELECT * FROM {$tablename} ");
        $nf = mysql_num_fields($res2);
        $nr = mysql_num_rows($res2);
        $fl = "";
        //parse the field info first
        for ($b = 0; $b < $nf; $b++) {
            $fn = mysql_field_name($res2, $b);
            $ft = mysql_fieldtype($res2, $b);
            $fs = mysql_field_len($res2, $b);
            $ff = mysql_field_flags($res2, $b);
            $sql .= "    {$fn} ";
            $is_numeric = false;
            switch (strtolower($ft)) {
                case "int":
                    $sql .= "int";
                    $is_numeric = true;
                    break;
                case "blob":
                    $sql .= "text";
                    $is_numeric = false;
                    break;
                case "real":
                    $sql .= "real";
                    $is_numeric = true;
                    break;
                case "string":
                    $sql .= "char({$fs})";
                    $is_numeric = false;
                    break;
                case "unknown":
                    switch (intval($fs)) {
                        case 4:
                            //little weakness here...there is no way (thru the PHP/MySQL interface) to tell the difference between a tinyint and a year field type
                            $sql .= "tinyint";
                            $is_numeric = true;
                            break;
                        default:
                            //we could get a little more optimzation here! (i.e. check for medium ints, etc.)
                            $sql .= "int";
                            $is_numeric = true;
                            break;
                    }
                    break;
                case "timestamp":
                    $sql .= "timestamp";
                    $is_numeric = true;
                    break;
                case "date":
                    $sql .= "date";
                    $is_numeric = false;
                    break;
                case "datetime":
                    $sql .= "datetime";
                    $is_numeric = false;
                    break;
                case "time":
                    $sql .= "time";
                    $is_numeric = false;
                    break;
                default:
                    //future support for field types that are not recognized (hopefully this will work without need for future modification)
                    $sql .= $ft;
                    $is_numeric = true;
                    //I'm assuming new field types will follow SQL numeric syntax..this is where this support will breakdown
                    break;
            }
            //VERY, VERY IMPORTANT!!! Don't forget to append the flags onto the end of the field creator
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:101,代码来源:sqlbackup.php

示例8: nuRunQuery

<?php

/*
** File:           image.php
** Author:         nuSoftware
** Created:        2007/04/26
** Last modified:  2009/07/15
**
** Copyright 2004, 2005, 2006, 2007, 2008, 2009 nuSoftware
**
** This file is part of the nuBuilder source package and is licensed under the
** GPLv3. For support on developing in nuBuilder, please visit the nuBuilder
** wiki and forums. For details on contributing a patch for nuBuilder, please
** visit the `Project Contributions' forum.
**
**   Website:  http://www.nubuilder.com
**   Wiki:     http://wiki.nubuilder.com
**   Forums:   http://forums.nubuilder.com
*/
$dir = $_GET['dir'];
$imageID = $_GET['iid'];
include "../{$dir}/database.php";
include 'common.php';
$s = "SELECT * FROM zzsys_image WHERE zzsys_image_id = '{$imageID}'";
$t = nuRunQuery($s);
$r = db_fetch_object($t);
Header("Content-type: image/png");
print $r->sim_blob;
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:28,代码来源:image.php

示例9: AND

    $SQL->setWhere(" {$SQL->where} AND ({$object->sob_lookup_id_field} = '{$rID}')");
}
$SQL->removeAllFields();
$SQL->addField($object->sob_lookup_id_field);
$fieldNames[] = $object->sob_all_name;
$SQL->addField($object->sob_lookup_code_field);
$fieldNames[] = 'code' . $object->sob_all_name;
$SQL->addField($object->sob_lookup_description_field);
$fieldNames[] = 'description' . $object->sob_all_name;
$t = nuRunQuery("SELECT * FROM zzsys_lookup WHERE slo_zzsys_object_id = '{$object->zzsys_object_id}'");
while ($r = db_fetch_object($t)) {
    $SQL->addField($r->zzsys_slo_table_field_name);
    $fieldNames[] = $r->zzsys_slo_page_field_name;
}
$t = nuRunQuery($SQL->SQL);
$fieldArray = tableFieldNamesToArray($t);
$T = nuRunQuery($SQL->SQL);
$R = db_fetch_row($T);
for ($i = 0; $i < count($fieldArray); $i++) {
    tofile("UPDATE zzsys_small_form_value SET sfv_value = '" . $R[$i] . "'  WHERE sfv_form_record = '{$f}{$fr}{$ses}' AND sfv_name = '" . $fieldNames[$i] . "'");
    nuRunQuery("UPDATE zzsys_small_form_value SET sfv_value = '" . $R[$i] . "'  WHERE sfv_form_record = '{$f}{$fr}{$ses}' AND sfv_name = '" . $fieldNames[$i] . "'");
}
$url = "formsmall.php?x=11&f={$f}&fr={$fr}&r={$rID}&dir={$dir}&ses={$ses}";
print "<html>\n<body onload=\"document.forms.lookup.submit()\">\n";
print "<form name='lookup' method='POST' action='{$url}'>\n</form>\n";
print "</body>\n</html>\n";
return;
?>


开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:28,代码来源:formlookupsmall.php

示例10: db_columns

function db_columns($n)
{
    $a = array();
    $d = $_SESSION['DBName'];
    $s = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '{$d}' AND TABLE_NAME = '{$n}' ORDER BY ORDINAL_POSITION";
    $t = nuRunQuery($s);
    while ($r = db_fetch_object($t)) {
        $a[] = $r->COLUMN_NAME;
    }
    return $a;
}
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:11,代码来源:nudatabase.php

示例11: nuDownloadFile

function nuDownloadFile($i, $s = '')
{
    //-- $s can be used to get type, name and blob from another table
    if ($s == '') {
        $s = "SELECT sfi_type AS file_type, sfi_name AS file_name, sfi_blob AS file_blob FROM zzzsys_file WHERE zzzsys_file_id = '{$i}'";
    }
    $t = nuRunQuery($s);
    $r = db_fetch_object($t);
    header('Content-Type: ' . $r->file_type . ';');
    header('Content-Disposition: attachement;filename="' . $r->file_name . '";');
    $f = fopen('php://output', 'w');
    fwrite($f, $r->file_blob);
    fclose($f);
}
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:14,代码来源:nucommon.php

示例12: buildControls

 public function buildControls($sectionNumber, $canGrow, $record)
 {
     $s = '';
     $setup = nuSetup();
     $dq = '"';
     $sortedControls = $this->sortSectionControlsByTopPositionOrder($sectionNumber, $this->report->Controls);
     for ($j = 0; $j < count($sortedControls); $j++) {
         $pSection = $sortedControls[$j]["Section"];
         $pName = $sortedControls[$j]["Name"];
         $pControlSource = $sortedControls[$j]["Source"];
         $i = $this->getDisplayControlIndex($pSection, $pName, $pControlSource);
         if ($this->report->Controls[$i]->Section == $sectionNumber) {
             $Name = $this->report->Controls[$i]->Name;
             $Source = $this->report->Controls[$i]->ControlSource;
             $ControlType = $this->report->Controls[$i]->ControlType;
             $Top = $this->toScale($this->report->Controls[$i]->Top);
             $Width = $this->toScale($this->report->Controls[$i]->Width);
             $Height = $this->toScale($this->report->Controls[$i]->Height);
             $Left = $this->toScale($this->report->Controls[$i]->Left);
             $Section = $this->report->Controls[$i]->Section;
             $Fontname = $this->report->Controls[$i]->FontName;
             $Fontsize = $this->report->Controls[$i]->FontSize;
             $Format = $this->report->Controls[$i]->Format;
             $Decimal = $this->report->Controls[$i]->DecimalPlaces;
             $IsHyperlink = $this->report->Controls[$i]->IsHyperlink;
             $ReportTag = $this->report->Controls[$i]->Tag;
             $Report = $this->report->Controls[$i]->Report;
             $Parameters = $this->report->Controls[$i]->Parameters;
             $LikeClause = $this->report->Controls[$i]->SmartTags;
             $LikeClause = str_replace("\"", "", $LikeClause);
             //image
             if ($this->sectionGrow == 1 && $sectionNumber != 0) {
                 $Top = $Top + $this->sectionGrowStack;
             }
             //========================================================================================
             if ($this->controlType($this->report->Controls[$i]->ControlType) == 'page break') {
                 $this->justDidPageBreak = true;
                 $this->hasExplicitPageBreak = true;
             }
             //========================================================================================
             if ($this->controlType($this->report->Controls[$i]->ControlType) == 'graph') {
                 $thetag = $this->report->Controls[$i]->ControlSource;
                 $thename = $this->report->Controls[$i]->Graph;
                 $thedir = $_GET['dir'];
                 for ($a = 0; $a < count($this->fields); $a++) {
                     //-----replace any strings, with hashes around them, in the querystring that match
                     //-----fieldnames in the table
                     //-----with values from the table
                     //-----e.g. id=#ID# could become id=007
                     $thetag = str_replace('#' . $this->fields[$a] . '#', $record[$this->fields[$a]], $thetag);
                 }
                 $addSession = '&ses=' . $_GET['ses'];
                 $s = $s . "   <div  style='position:absolute;left:{$Left};top:{$Top};height:{$Height}'>\n";
                 $s = $s . "      <img src='graph_report.php?dir={$thedir}{$addSession}&activityID={$this->reportID}&graph_name={$thename}&{$thetag}'>\n";
                 $s = $s . "   </div>\n";
             }
             //========================================================================================
             if ($this->controlType($this->report->Controls[$i]->ControlType) == 'image') {
                 $thetag = $this->report->Controls[$i]->ControlSource;
                 $imageCode = $this->report->Controls[$i]->Graph;
                 //-- the code (sim_code in zzsys_image)
                 $thedir = $_GET['dir'];
                 for ($a = 0; $a < count($this->fields); $a++) {
                     //-----replace any strings, with hashes around them, in the querystring that match
                     //-----fieldnames in the table
                     //-----with values from the table
                     //-----e.g. id=#ID# could become id=007
                     $thetag = str_replace('#' . $this->fields[$a] . '#', $record[$this->fields[$a]], $thetag);
                 }
                 $imageT = nuRunQuery("SELECT zzsys_image_id FROM zzsys_image WHERE sim_code = '{$imageCode}'");
                 $imageR = db_fetch_row($imageT);
                 $s = $s . "   <div  style='position:absolute;left:{$Left};top:{$Top};height:{$Height}'>\n";
                 $s = $s . "      <img src='formimage.php?dir={$thedir}&iid={$imageR['0']}&{$thetag}'>\n";
                 $s = $s . "   </div>\n";
             }
             //========================================================================================
             if ($this->controlType($this->report->Controls[$i]->ControlType) == 'label') {
                 if ($Source == '=Date()' || $Source == '=Now()') {
                     if ($Format == '' || $Format == '20' || $Format == 'Long Date') {
                         $formattedValue = date('d-M-Y H:i');
                     } else {
                         $formattedValue = date($this->accessDateFormatToPHPDateFormat($Format));
                     }
                     //$Caption = $formattedValue;
                     $s = $s . "      <div class='{$Name}' style='position:absolute;top:{$Top};height:{$Height}'>{$formattedValue}</div>\n";
                 } else {
                     if ($Source == '="Page " & [Page] & " of " & [Pages]') {
                         $formattedValue = "Page #thePageNumber# of #totalNumberOfPages#";
                         $s = $s . "      <div class='{$Name}' style='position:absolute;top:{$Top};height:{$Height}'>{$formattedValue}</div>\n";
                         //echo $s."<br>";
                     } else {
                         $s = $s . "      <div class='{$Name}' style='position:absolute;top:{$Top};height:{$Height}'>" . $this->report->Controls[$i]->Caption . "</div>\n";
                     }
                 }
             }
             //========================================================================================
             if ($this->controlType($this->report->Controls[$i]->ControlType) == 'text area') {
                 //--Field
                 $displayValue = $record[$this->report->Controls[$i]->ControlSource];
                 //Sum
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:101,代码来源:run_report_html_v1.php

示例13: nuRunQuery

<?php

require_once 'nucommon.php';
$s = "SELECT * FROM zzzsys_file WHERE sfi_code = ? ";
$t = nuRunQuery($s, array($_GET['i']));
$r = db_fetch_object($t);
$f = "'Content-type: {$r->sfi_type}'";
Header($f);
print $r->sfi_blob;
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:9,代码来源:nufileget.php

示例14: fopen

} else {
    $filename = $_FILES['uploadedfile']['tmp_name'];
    $handle = fopen($filename, "rb");
    $contents = fread($handle, filesize($filename));
    $contents = addslashes($contents);
    fclose($handle);
    $newRecord = false;
    if ($iid == '-1' or $iid == '') {
        $iid = uniqid('1');
        $newRecord = true;
    }
    if ($newRecord) {
        nuRunQuery("INSERT INTO zzsys_image (zzsys_image_id, sim_blob) VALUES ('{$iid}','{$contents}')");
        tofile('new');
    } else {
        nuRunQuery("UPDATE zzsys_image SET sim_blob = '{$contents}' WHERE zzsys_image_id = '{$iid}'");
        tofile('old');
    }
    print "<script>\n\n";
    print "function closedown(){\n";
    //--- set zzsys_image_id on opener page
    print "   window.opener.document.getElementById('recordID').value = '{$iid}';\n\n";
    print "   if(window.opener.nuAfterUpload){\n";
    print "      window.opener.nuAfterUpload('recordID');\n";
    print "   };\n\n";
    print "   self.close();\n\n";
    print "}\n";
    print "</script>\n";
    print "<body onload=' closedown()'>\n";
}
print "</body>";
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:31,代码来源:imageuploader.php

示例15: Array

print "theWeight[2] = 'lighter'\n";
print "\nvar theControl = new Array()\n";
print "theControl[0] = 'Field'\n";
print "theControl[1] = 'Label'\n";
print "theControl[2] = 'Graph'\n";
print "theControl[3] = 'PageBreak'\n";
print "\nvar theGraph = new Array()\n";
$tg = nuRunQuery("SELECT sag_graph_name FROM zzsys_activity_graph WHERE sag_zzsys_activity_id = '{$reportID}'");
$tcount = 1;
print "theGraph[0] = ''\n";
while ($rg = db_fetch_row($tg)) {
    print "theGraph[{$tcount}] = 'graph-{$rg['0']}'\n";
    $tcount = $tcount + 1;
}
//added by nick 15-01-09
$tg = nuRunQuery("SELECT sim_code FROM zzsys_image ");
while ($rg = db_fetch_row($tg)) {
    print "theGraph[{$tcount}] = 'image-{$rg['0']}'\n";
    $tcount = $tcount + 1;
}
print "\n</script>\n";
function sectionNumber($pSection, $pLayout, $pVisible)
{
    $arrayNumberOfSection = -1;
    for ($i = 0; $i < count($pLayout->Sections); $i++) {
        if ($pLayout->Sections[$i]->SectionNumber == $pSection) {
            $arrayNumberOfSection = $i;
        }
    }
    if ($arrayNumberOfSection == -1) {
        //--not created by Access Report
开发者ID:BackupTheBerlios,项目名称:nubuilder-svn,代码行数:31,代码来源:nureportbuilder.php


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