• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getDBCell函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: draw

		/**
		   * This function is used for drawing the html-code out to the templates.
		   * It just returns the code
		   * @param 		string	Optional parameters for the draw-function. There are none supported.
		   * @return		string	HTML-CODE to be written into the template.
		   */
		function draw($param = "") {			
			global $cds;
			$label = getDBCell("pgn_config_store", "TEXT1", "CLTI_ID=".$this->fkid);
			echo '<script language="javascript" type="text/javascript">
	<!--
	var win=null;
	
	function NewWindow(mypage,myname,w,h,scroll,pos){
		if(pos=="random")
			{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
		if(pos=="center")
			{LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;}
	
		else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings=\'width=\'+w+\',height=\'+h+\',top=\'+TopPosition+\',left=\'+LeftPosition+\',scrollbars=\'+scroll+\',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes\';
	win=window.open(mypage,myname,settings);}
	// -->
	</script>';
		
			echo '<div style="float:right;">';
			echo '&nbsp;&nbsp;<a class="breadcrumb" href="#" onclick="NewWindow'."('".$cds->docroot."/sys/tellafriend/recommend.popup.php','recommend','450','450','no','center');return false".'" onfocus="this.blur()">'.$label.'</a>&nbsp;&nbsp;';	
			echo '</div>';
		}	
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:pgn_tellafriend.php


示例2: isLive

function isLive($id)
{
    if (getDBCell("state_translation", "OUT_ID", "OUT_ID={$id}") != "") {
        return true;
    }
    return false;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:7,代码来源:galxml.php


示例3: createImageFromFile

/**
 * Create a image from a file. Do not add the file to the object library
 * @param string Path to the source file
 * @param string Description Text for ALT-Tag
 * @param string Copright text for the image
 * @param string Variation-ID of the image
 */
function createImageFromFile($sourceFile, $alt = "", $copyright = "", $variation = 1, $categoryId = 1)
{
    global $c, $db;
    $id = nextGUID();
    $info = pathinfo($sourceFile);
    $extension = $info["extension"];
    $extension2 = strtoupper($extension);
    $name = parseSQL($info["basename"]);
    if ($extension2 == "JPG" || $extension2 == "GIF" || $extension2 == "PNG") {
        $size = getimagesize($sourceFile);
        $width = $size[0];
        $height = $size[1];
        copy($sourceFile, $c["devfilespath"] . $id . "." . $extension);
        $thumb = new Img2Thumb($c["devfilespath"] . $id . "." . $extension, 120, 120, $c["devfilespath"] . "t" . $id);
        $sql = "INSERT INTO pgn_image (FKID, FILENAME, ALT, COPYRIGHT, WIDTH, HEIGHT) VALUES ";
        $sql .= "({$id}, '{$id}.{$extension}', '{$alt}', '{$copyright}', {$width}, {$height})";
        $query = new query($db, $sql);
        $query->free();
        // Create Library Entry for this image
        $cid = nextGUID();
        $imageModule = getDBCell("modules", "MODULE_ID", "MODULE_NAME='Image'");
        $sql = "INSERT INTO content (CID, MODULE_ID, NAME, CATEGORY_ID, MT_ID) VALUES ";
        $sql .= "({$cid}, {$imageModule}, '{$name}', {$categoryId}, 0)";
        $query = new query($db, $sql);
        $query->free();
        $sql = "INSERT INTO content_variations (CID, VARIATION_ID, FK_ID) VALUES ";
        $sql .= "({$cid}, {$variation}, {$id})";
        $query = new query($db, $sql);
        $query->free();
        return $cid;
    } else {
        return null;
    }
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:41,代码来源:image.php


示例4: CoordinatesInput

 /**
  * standard constructor
  * @param string Text that is to be shown as description or label with your object.
  * @param string Table, you want to connect with the object.
  * @param string $longitude,column, which stores the longitude
  * @param string $latitude, columnd, which stores the latitude
  * @param string $row_identifier Usually to be generated with form->setPK. Identifies the
  * row in db, you want to affect with operation. Keep empty for insert. (Example: stdEDForm)
  */
 function CoordinatesInput($label, $table, $longitude, $latitude, $row_identifier = "1")
 {
     global $page, $page_state, $forceLoadFromDB, $page_action;
     DBO::DBO($label, $table, $longitude, $row_identifier, "");
     $this->lng = $longitude;
     $this->lat = $latitude;
     $this->vlng = 0;
     $this->vlat = 0;
     if ($page_state == "processing" && value("changevariation") != "GO" && !($forceLoadFromDB == "yes")) {
         $this->vlng = value("coordY", "NUMERIC", "0");
         $this->vlat = value("coordX", "NUMERIC", "0");
     } else {
         if (($page_action == "UPDATE" || $page_action == "DELETE") && $this->row_identifier != "1") {
             $this->vlng = getDBCell($table, $longitude, $row_identifier);
             $this->vlat = getDBCell($table, $latitude, $row_identifier);
         }
     }
     include_once "nxgooglemapsapi.php";
     $this->api = new NXGoogleMapsAPI();
     $this->api->setWidth(590);
     $this->api->setHeight(350);
     $this->api->addControl(GLargeMapControl);
     $this->api->addControl(GOverviewMapControl);
     $this->api->addControl(GMapTypeControl);
     $this->api->setCenter(50, 10);
     $this->api->setZoomFactor(4);
     if ($this->vlng != 0 || $this->vlat != 0) {
         $this->api->addDragMarker($this->vlng, $this->vlat);
     }
     $page->headerPayload = $this->api->getHeadCode();
     $page->onLoad .= $this->api->getOnLoadCode();
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:41,代码来源:coords_input.php


示例5: img

 function img($attr = null)
 {
     $fileinfo = pathinfo($attr["SRC"]);
     $id = substr($fileinfo["basename"], 0, strlen($fileinfo["basename"]) - 1 - strlen($fileinfo["extension"]));
     if (is_numeric($id)) {
         $cid = getDBCell("content_variations", "CID", "FK_ID = " . $id);
     }
     if (is_numeric($cid)) {
         $output = '{NX:IMAGE ID="' . $cid . '"';
         $manualattribs = array("ID", "SRC");
         foreach ($attr as $key => $value) {
             if (!in_array(strtoupper($key), $manualattribs) && strlen($key) > 0) {
                 $output .= " " . strtoupper($key) . "=\"" . $value . "\"";
             }
         }
         $output .= '}';
     } else {
         $oldlink = "<img";
         foreach ($attr as $key => $value) {
             $oldlink .= " {$key}=\"{$value}\"";
         }
         $oldlink .= ">";
         return $oldlink;
     }
     return $output;
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:26,代码来源:html2nx.php


示例6: parentClusters

/**
 * Find all clusters having one from the given array included.
 * @params array Array with ClusterNodeIds to check for incluseion
 * @param integer used for recursion control, do not change manuallay.
 */
function parentClusters($clArray, $level = 0)
{
    $clnids = array();
    if ($level > 5) {
        return $clnids;
    }
    for ($i = 0; $i < count($clArray); $i++) {
        $cl = $clArray[$i];
        // find dynamic clusters....
        $clids = createDBCArray("cluster_content", "CLID", "FKID = {$cl}");
        for ($j = 0; $j < count($clids); $j++) {
            array_push($clnids, getDBCell("cluster_variations", "CLNID", "CLID = " . $clids[$j]));
        }
        // find static clusters...
        $clts = createDBCArray("cluster_template_items", "CLT_ID", "FKID = " . $cl);
        for ($j = 0; $j < count($clts); $j++) {
            $clns = createDBCArray("cluster_node", "CLNID", "CLT_ID = " . $clts[$j]);
            $clnids = array_merge($clnids, $clns);
        }
    }
    if (is_array($clnids)) {
        $clnids = array_unique($clnids);
    }
    // traverse down the tree, max 10 levels...
    $parents = parentClusters($clnids, $level + 1);
    $clnids = array_merge($clnids, $parents);
    if (is_array($clnids)) {
        $clnids = array_unique($clnids);
    }
    return $clnids;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:36,代码来源:usage.inc.php


示例7: execute

 /**
  * Perform the export.
  */
 function execute()
 {
     global $errors, $lang, $sid;
     $minus = 0;
     $pages = createDBCArray("sitepage", "SPID", "MENU_ID = " . $this->menuId);
     for ($i = 0; $i < count($pages); $i++) {
         $cluster = getDBCell("sitepage", "CLNID", "SPID=" . $pages[$i]);
         $articles = countRows("channel_articles", "ARTICLE_ID", "ARTICLE_ID=" . $cluster);
         if ($articles == 0) {
             importClusterToArticle($pages[$i], $this->channelId, $this->categoryId);
         } else {
             $minus++;
             $error = $lang->get("already_imported", "At least one page has not been imported, because it already exists in an channel.");
         }
     }
     if ($errors == "") {
         $this->add(new WZLabel($lang->get("ch_imp_success", "The data was successfully imported to the channel.")));
         if (strlen($error) > 0) {
             $this->add(new WZLabel($error));
         }
         $this->add(new WZLabel($lang->get("num_imp_pages", "Total number of imported pages:") . " " . (count($pages) - $minus)));
     } else {
         $this->add(new WZLabel($lang->get("ch_imp_failed", "There was an error while importing the data to the channel.")));
     }
     $this->parent->finished = true;
     $this->add(new WZLabel($lang->get("back_to_channels", "Back to Article Overview") . " >>", "modules/channels/overview.php?sid={$sid}"));
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:30,代码来源:st_import.php


示例8: DateTimeInput

		/**
		 * standard constructor
		 * @param string Text that is to be shown as description or label with your object.
		 * @param string Table, you want to connect with the object.
		 * @param string column, you want to connect with the object.
		 * @param string $row_identifier Usually to be generated with form->setPK. Identifies the
		 * row in db, you want to affect with operation. Keep empty for insert. (Example: stdEDForm)
		 * @param string $params Allowed parameter is:
		 * param:<Name of form> needed for js-reasons.
		 * @param string $check Does checks on user input. Allowed are MANDATORY (=not null)|UNIQUE. Separate with &.
		 * @param string $db_datatype Datatype of the database, you want to use. Allowed is DATE only.
		 */
		function DateTimeInput($label, $table, $column, $row_identifier = "1", $params = "param:form1", $check = "", $db_datatype = "DATE") {
			DBO::DBO($label, $table, $column, $row_identifier, $params, $db_datatype, $check);

			// load the data of the field.
			global $page_state, $page_action;

			if ($page_state == "processing") {
				$this->value = value($this->name, "NOSPACES", "");
				if ($this->value != "") {
					$this->value.=" ".value($this->name."_time", "NOSPACES", "").":00";
					$this->value = str_replace("/", "-", $this->value);

					/** added 21.1.2002 */
					global $c_magic_quotes_gpc;

					if ($c_magic_quotes_gpc == 1)
						$this->value = str_replace("\\", "", $this->value);
					/** got rid of magic quotes! */
					$this->oldvalue = getDBCell($table, $column, $row_identifier);
				}
			} else {
				if (($page_action == "UPDATE" || $page_action == "DELETE") && $this->row_identifier != "1") {
					$this->value = getDBCell($table, $column, $row_identifier);

					if ($this->value == "0000-00-00 00:00:00"  || $this->value == "00:00:00" || $this->value=="")
						$this->value = "";
				}
			}

			$this->v_wuiobject = new DateTimebox($this->name, $this->value, $this->std_style, $this->parameter);
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:43,代码来源:date_time_input.php


示例9: draw

		/**
		   * This function is used for drawing the html-code out to the templates.
		   * It just returns the code
		   * @param 		string	Optional parameters for the draw-function. There are none supported.
		   * @return		string	HTML-CODE to be written into the template.
		   */
		function draw($param = "") {			
			global $cds;
			$label = getDBCell("pgn_config_store", "TEXT1", "CLTI_ID=".$this->fkid);
			
			echo '<div style="float:right;">';
			echo '&nbsp;&nbsp;<a class="breadcrumb" href="#" onclick="window.print();return false;">'.$label.'</a>&nbsp;&nbsp;';	
			echo '</div>';
		}	
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:14,代码来源:pgn_printpage.php


示例10: CLTISelector

		/**
		 * Standard constructor
		 * @param string name of the table, the data is to be stored
		 * @param string name of the column, the data is to be stored
		 * @param string Where-Condition to select the record that is to be updated.
		 */
		function CLTISelector($table, $column, $row_identifier) {
			$this->table = $table;
			$this->column = $column;
			$this->cond = $row_identifier;
			$this->fk = getDBCell($table, $column, $row_identifier);

			global $lang, $db;
			
			$pattern = value("pattern");
			if ($pattern == "0") $pattern="%";
			$cltid = value("cltid", "NUMERIC");
			$searchin = value("searchin", "NUMERIC");
			
			$this->add(new Label("lbl1", $lang->get("sr_selectcli"), "informationheader", 2));

			$this->add(new Label("lbl", "<b>" . $lang->get("selectedinstance"). "</b>", "informationheader"));

			if ($this->fk != 0) {
				$this->idlabel = new Label("lbl0", getDBCell("cluster_node", "NAME", "CLNID = " . $this->fk), "informationheader");
			} else {
				$this->idlabel = new Label("lbl0", $lang->get("empty"), "informationheader");
			}

			$this->add($this->idlabel);

			$this->add(new Label("lbl2", $lang->get("clt_browse"), "standard"));
			$cltemplates = null;

			$this->createCLT($cltemplates, "/", 0);

			$this->add(new Dropdown("cltid", $cltemplates, "standard", $cltid, 220, 1));

			$searchins[0][0] = $lang->get("searchin");
			$searchins[0][1] = 0;
			$searchins[1][0] = $lang->get("name");
			$searchins[1][1] = 1;
			$searchins[2][0] = $lang->get("description");
			$searchins[2][1] = 2;

			$this->add(new Dropdown("searchin", $searchins, "standard", $searchin, 220, 1));
			$this->add(new Input("pattern", $pattern, "standard", 32, "", 250));
			$this->add(new Cell("clc", "standard", 1, 250));
			$this->add(new ButtonInCell("search", $lang->get("search"), "standard", "SUBMIT"));

			if (value("search") != "0") {

				// prepare search-pattern.
				$ppattern = strtoupper($pattern);

				$ppattern = ereg_replace(" ", "%", $ppattern);
				$ppattern = ereg_replace("\*", "%", $ppattern);

				$this->search("/", $cltid, $searchin, $ppattern);

				$this->add(new Label("lbl4", $lang->get("searchresults"), "standard"));
				$this->add(new Dropdown("CIDRES", $this->results, "standard", $CID, 250, 1));
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:64,代码来源:clti_selector.php


示例11: draw

		/**
		   * This function is used for drawing the html-code out to the templates.
		   * It just returns the code
		   * @param 		string	Optional parameters for the draw-function. There are none supported.
		   * @return		string	HTML-CODE to be written into the template.
		   */
		function draw($param = "") {
			$groupId = getDBCell("pgn_auth", "GROUP_ID", "FKID=".$this->fkid);
			$result = new authCommunity($groupId);
			if (value("logout") != "0") {
				$result->logout();
				$result = new authCommunity($groupId);				
			}
			return $result;
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:15,代码来源:pgn_auth.php


示例12: journal

		function journal($id, $isLive = false) {
			global $db, $auth, $insertstatements;

			if ($isLive) {
				$id = translateState($id, 10, false);
			}

			$this->id = $id;
			$this->userId = $auth->userId;

			$jnlCreated = getDBCell("journal", "CREATED", "ITEM_ID = $this->id");

			if ($jnlCreated == 0) {
				$nextSlot = count($insertstatements);

				$journalInsert = new InsertSet("journal");

				$journalInsert->setPK("JOURNAL_ID");

				$journalInsert->add("ITEM_ID", $this->id, "NUMBER");
				$journalInsert->add("CREATED", time(), "NUMBER");

				$insertstatements[$nextSlot] = $journalInsert;

				$this->itemStatus["created"]["time"] = 0;
				//$this->itemStatus["created"]["by"] = $rstJournal->getValue("CREATED_BY");
				$this->itemStatus["launched"]["time"] = 0;
				//$this->itemStatus["launched"]["by"] = $rstJournal->getValue("LAUNCHED_BY");
				$this->itemStatus["expired"]["time"] = 0;
				//$this->itemStatus["expired"]["by"] = $rstJournal->getValue("EXPIRED_BY");
				$this->itemStatus["changed"]["time"] = 0;
				//$this->itemStatus["changed"]["by"] = $rstJournal->getValue("CHANGED_BY");
				$this->itemStatus["deleted"]["time"] = 0;
				//$this->itemStatus["deleted"]["by"] = $rstJournal->getValue("DELETED_BY");
				$this->itemStatus["staged"]["time"] = 0;
				//$this->itemStatus["staged"]["by"] = $rstJournal->getValue("STAGED_BY");
				$this->itemStatus["locked"]["time"] = 0;
				$this->itemStatus["locked"]["by"] = 0;
			} else {
				$rstJournal = new Recordset("journal", "*", "ITEM_ID = $this->id");

				$this->itemStatus["created"]["time"] = $rstJournal->getValue("CREATED");
				//$this->itemStatus["created"]["by"] = $rstJournal->getValue("CREATED_BY");
				$this->itemStatus["launched"]["time"] = $rstJournal->getValue("LAUNCHED");
				//$this->itemStatus["launched"]["by"] = $rstJournal->getValue("LAUNCHED_BY");
				$this->itemStatus["expired"]["time"] = $rstJournal->getValue("EXPIRED");
				//$this->itemStatus["expired"]["by"] = $rstJournal->getValue("EXPIRED_BY");
				$this->itemStatus["changed"]["time"] = $rstJournal->getValue("CHANGED");
				//$this->itemStatus["changed"]["by"] = $rstJournal->getValue("CHANGED_BY");
				$this->itemStatus["deleted"]["time"] = $rstJournal->getValue("DELETED");
				//$this->itemStatus["deleted"]["by"] = $rstJournal->getValue("DELETED_BY");
				$this->itemStatus["staged"]["time"] = $rstJournal->getValue("STAGED");
				//$this->itemStatus["staged"]["by"] = $rstJournal->getValue("STAGED_BY");
				$this->itemStatus["locked"]["time"] = $rstJournal->getValue("LOCKED");
				$this->itemStatus["locked"]["by"] = $rstJournal->getValue("LOCKED_BY");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:57,代码来源:journal.php


示例13: draw

		/**
		   * This function is used for drawing the html-code out to the templates.
		   * It just returns the code
		   * @param 		string	Optional parameters for the draw-function. There are none supported.
		   * @return		string	HTML-CODE to be written into the template.
		   */
		function draw($param = "") {
			global $cds, $c;
			if ($cds->is_development) {
				$content = '<div style="border:1px solid black; background-color:#e0e0e0;align:center;vertical-align:middle;padding:10px;">Adsene Placeholder. <br>Avoids influences to your adsense statistics.</div>';
			} else {			  
			  $content = unhtmlspecialchars(getDBCell("pgn_adsense", "ADTEXT", "FKID = $this->fkid"));						  
			  $content.= '<script type="text/javascript">bug = new Image(); bug.src=\''.$c["livedocroot"]."sys/hit.php?id=".$this->fkid.'&scope=adsense\';</script>';
			}
			return $content;
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:pgn_adsense.php


示例14: getAPI

 /**
  * Get the API-Object of a type 3 Plugin
  * @param string name of the Type-3 Plugin
  * @param mixed parameters as assosiative array ("id" => 12);
  */
 function getAPI($name, $parameters = null)
 {
     $pluginId = getDBCell("modules", "MODULE_ID", "UPPER(MODULE_NAME) = '" . strtoupper($name) . "' AND MODULE_TYPE_ID = 3");
     includePGNSource($pluginId);
     $ref = createPGNRef($pluginId, 0);
     if (is_object($ref)) {
         return $ref->draw($parameters);
     } else {
         return null;
     }
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:cds_plugins.php


示例15: preview

		/** 
		  * Used, for painting a preview of the content in the cms. Note, that the data
		  * is to be drawn in a table cell. Therefore you may design any html output, but
		  * you must return it as return value!
		  */
		function preview() {
			global $c, $lang;
	
	  	$filename = getDBCell("pgn_file", "FILENAME", "FKID = $this->fkid");
			$copyright = getDBCell("pgn_file", "COPYRIGHT", "FKID = $this->fkid");
			$name	  = getDBCell("pgn_file", "NAME", "FKID=$this->fkid");
      if ($filename=="") {
        return "<div align=\"center\">".$lang->get('nofile', 'No file uploaded yet.')."</div>";
      } else {			
			  return "<div align=\"center\"><a href=\"".$c['devfilesdocroot'].$filename."\" target=\"blank\">".$name."</a></div>";	
      }
			return $output;
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:18,代码来源:pgn_file.php


示例16: getSingleEdit

        /**
		 * Draw the input boxes needed for editing the contents in the envelope.
		 * @param integer id of cluster_content.CLCID
		 */
		function getSingleEdit($id) {
			global $specialID;
			if ($this->editState && $this->editor) {
				$viewOnly = false;
			} else {
				$viewOnly = true;	
			}
			$specialID = $id;
			$filterId = getDBCell("cluster_template_items", "FKID", "CLTI_ID = ".$this->clti);
			$filter = getDBCell("modules", "MODULE_NAME", "MODULE_ID = ".$filterId);
			$this->add(new LibrarySelect("cluster_content", "FKID", "CLCID=$id", $filter, 2, $viewOnly));
			$specialID = "";
			
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:18,代码来源:library_envelope.php


示例17: PluginInput

	/**
	 * Standard Constructor
	 *
	 * @param string Name to display on top.
	 * @param string Table where the FK is saved in
	 * @param string Column where the FK id saved in to reference the plugin.
	 * @param string Where-Clause to select a FK
	 * @param string Name of the plugin.
	 * @param string A reference to the form ýou are using.
	 * @param boolean show preview of the plugin.
	 * @param string style of the control.
	 */
	function PluginInput($label, $table, $column, $cond, $pgnname, & $form, $showpreview=false, $style="standard") {
       	   global $page_state, $page_action;
	   $this->label = $label;
	   $this->table = $table;
	   $this->column = $column;
	   $this->cond = $cond;
	   $this->pgnname = $pgnname;
	   $this->style = $style;
	   $this->form = &$form;
	   
	   $this->v_label = new Label("lbl_".$column, $label, $this->style,2);
	 	
	   //now retrieve the values....
	   $this->pgntypeid = getDBCell("modules", "MODULE_ID", "UPPER(MODULE_NAME) = '".strtoupper($pgnname)."'");
	   if ($this->pgntypeid =="") {
	     $this->errortext = "<center> The Plugin $pgnname is not installed. </center>";   
	   } else {
	     	includePGNSource($this->pgntypeid);	 
		$form->add($this->v_label);
		if ($page_action == "UPDATE") {
		   	$fkid = getDBCell($table, $column, $cond);
		   	if ($fkid !="") {
			 	$ref = createPGNRef($this->pgntypeid, $fkid);
		     		if ($showpreview) {
  			 		$preview = $ref->preview();
			 		$this->form->add(new Label("lbl", $preview, "", 2));
			 	}
			 	$ref->edit($this->form);		
		   	}  
		 } else {
		   	$fkid=value("PGFK".$this->table.$this->column, "NUMERIC");			
		   	if ($fkid=="0") { 
			   	$fkid = nextGUID();
  			   	$ref = createPGNRef($this->pgntypeid, $fkid);		 	     			   	
			 } else {
			    	$ref = createPGNRef($this->pgntypeid, $fkid);		 	   			    	
			 }
			 $ref->edit($this->form);
			 $this->form->add(new Hidden("PGFK".$this->table.$this->column, $fkid));		
			 global $page_state;
			 if ($page_state == "processing") {
			   	// was commented out somewhat.
			 	addInsert($ref->management_table, $ref->pk_name, $fkid, "NUMBER");
			   	addInsert($table, $column, $fkid, "NUMBER");			 
			 }
		 }
	   } // plugin does exist
	}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:60,代码来源:plugin_input.php


示例18: TimeInput

		/**
		 * standard constructor
		 * @param string Text that is to be shown as description or label with your object.
		 * @param string Table, you want to connect with the object.
		 * @param string column, you want to connect with the object.
		 * @param string first $row_identifier Usually to be generated with form->setPK. Identifies the
		 * row in db, you want to affect with operation. Keep empty for insert. (Example: stdEDForm)
		 * @param string $params Allowed parameter is:
		 * param:<Name of form> needed for js-reasons.
		 * @param string $check Does checks on user input. Allowed are MANDATORY (=not null)|UNIQUE. Separate with &.
		 * @param string $db_datatype Datatype of the database, you want to use. TIME is allowed only
		 */
		function TimeInput($label, $table, $column, $row_identifier = "1", $style = "", $params = "", $check = "", $db_datatype = "TIME") {
			DBO::DBO($label, $table, $column, $row_identifier, $params, $db_datatype, $check);

			global $page_state;

			if ($page_state == "processing") {
				$fieldname = $this->name;

				if (value($fieldname) != "0")
					$this->value = value($fieldname);
			} else {
				$this->value = getDBCell($table, $column, $row_identifier);
			}

			$this->v_wuiobject = new Timebox($this->name, $this->std_style, "", substr($this->value, 0, 5));
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:28,代码来源:time_input.php


示例19: process

 /**
  * Checks, wheter a page is actually in INSERT or UPDATE mode an creates the corresponding
  * Saveset.
  */
 function process()
 {
     global $page_action;
     $this->posFilter = str_replace("<chcat>", "CHID = " . getvar("chsel"), $this->posFilter);
     $pos = getDBCell($this->table, $this->column, $this->posFilter . " AND " . $this->column . "=" . $this->value);
     if ($pos != "") {
         freeRowPosition($this->table, $this->column, $this->value, $this->posFilter);
     }
     if ($page_action == "INSERT") {
         addInsert($this->table, $this->column, $this->value, $this->datatype);
     } else {
         if ($page_action == "UPDATE") {
             addUpdate($this->table, $this->column, $this->value, $this->row_identifier, $this->datatype);
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:20,代码来源:position_input.php


示例20: XmlImportPlugin

/**
 * Import the XML as content to a plugin
 * @param string XML-Data to import.
 * @param integer GUID to use for this content or null for creation
 */
function XmlImportPlugin($xmlString, $id = null)
{
    if ($id == null) {
        $id = nextGUID;
    }
    $xmlOptions = array(XML_OPTION_CASE_FOLDING => TRUE, XML_OPTION_SKIP_WHITE => TRUE);
    $xml =& new XPath(FALSE, $xmlOptions);
    $xml->importFromString($xmlString);
    $type = strtoupper($xml->getAttributes('/NX:CONTENT[1]', "TYPE"));
    $moduleId = getDBCell("modules", "MODULE_ID", "UPPER(MODULE_NAME) = '{$type}'");
    if ($moduleId != "") {
        $pgn = createPGNRef($moduleId, $id);
        $pgn->import($xmlString);
        return $id;
    }
    return false;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:22,代码来源:plugin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getDBConnection函数代码示例发布时间:2022-05-15
下一篇:
PHP getDB函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap