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


PHP getDBCell函数代码示例

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


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


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