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

PHP nextGUID函数代码示例

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

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



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

示例1: syncVariations

/**
 * syncronize variations with entered data to the database.
 * The configuration for this function must be set manually.
 * I.E. there must be the $oid-Variable set and there must(!)
 * be also the global vars content_variations_VARIATION_ID_XX
 * and content_MODULE_ID
 * set which are automatically set by the SelectMultiple2Input.
 */
function syncVariations()
{
    global $db, $oid, $content_MODULE_ID;
    $module = value("content_MODULE_ID", "NUMERIC");
    if ($module == "0") {
        $module = $content_MODULE_ID;
    }
    includePGNSource($module);
    //delete all variations first.
    $del = "UPDATE content_variations SET DELETED=1 WHERE CID = {$oid}";
    $query = new query($db, $del);
    // get list of variations
    $variations = createNameValueArray("variations", "NAME", "VARIATION_ID", "DELETED=0");
    for ($i = 0; $i < count($variations); $i++) {
        $id = $variations[$i][1];
        if (value("content_variations_VARIATION_ID_" . $id) != "0") {
            // create or restore variation
            // check, if variations already exists and is set to deleted.
            $sql = "SELECT COUNT(CID) AS ANZ FROM content_variations WHERE CID = {$oid} AND VARIATION_ID = {$id}";
            $query = new query($db, $sql);
            $query->getrow();
            $amount = $query->field("ANZ");
            if ($amount > 0) {
                $sql = "UPDATE content_variations SET DELETED=0 WHERE CID = {$oid} AND VARIATION_ID = {$id}";
            } else {
                $fk = nextGUID();
                $sql = "INSERT INTO content_variations (CID, VARIATION_ID, FK_ID, DELETED) VALUES ( {$oid}, {$id}, {$fk}, 0)";
                $PGNRef = createPGNRef($module, $fk);
                $PGNRef->sync();
            }
            $query = new query($db, $sql);
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:42,代码来源:synchronize.php


示例2: 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


示例3: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;

			// Authentification is require_onced for changing system configuration. Do not change.
			if ($auth->checkPermission("ADMINISTRATOR")) {

				// parent registration function for initializing. Do not change.
				Plugin::registration();

				// Name of the Plugin. The name will be displayed in the WCMS for selection
				$this->name = "Google Maps API";
				// A short description, what the Plugin is for.
				$this->description = "Google Maps API";
				// Version of the plugin. Use integer numbers only. Is important for future releases.
				$this->version = 1;

				/**** do not change from this point ****/
				$mtid = nextGUID(); // getting next GUID.
				//del1

				// SQL for creating the tables in the database. Do not call, if you do not need any tables in the database 
				
				// SQL for deleting the tables from the database. 
				/**** change nothing beyond this point ****/
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();				
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', 3)");				
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:32,代码来源:pgn_googlemaps.php


示例4: createSitepageMaster

/**
 * Create a new Page Template
 * @param string Name
 * @param string Description
 * @param string Filename of the template
 * @param string Template
 * @param integer GUID of Cluster Template
 * @param integer Id of Type (1=singlepage, 2=multipage)
 * @param integer OPtional key to use.
 */
function createSitepageMaster($name, $description, $templatePath, $template, $clt, $type, $id = null)
{
    global $db, $c, $errors;
    if ($id == null) {
        $id = nextGUID();
    }
    $name = makeCopyName("sitepage_master", "NAME", parseSQL($name), "VERSION=0 AND DELETED=0");
    $description = parseSQL($description);
    $filename = substr($templatePath, 0, strcspn($templatePath, "."));
    $filesuffix = $templatePath = substr($templatePath, strcspn($templatePath, ".") + 1);
    $templatePath = makeUniqueFilename($c["devpath"], parseSQL($filename), $filesuffix);
    $fp = @fopen($c["devpath"] . $templatePath, "w+");
    if ($fp != "") {
        @fwrite($fp, $template);
        @fclose($fp);
    } else {
        $errors .= "--Could not write spm: " . $templatePath;
    }
    $sql = "INSERT INTO sitepage_master (SPM_ID, NAME, DESCRIPTION, TEMPLATE_PATH, CLT_ID, SPMTYPE_ID) VALUES ";
    $sql .= "({$id}, '{$name}', '{$description}', '{$templatePath}', {$clt}, {$type})";
    $query = new query($db, $sql);
    $query->free();
    $variations = createDBCArray("variations", "VARIATION_ID", "1");
    for ($i = 0; $i < count($variations); $i++) {
        $sql = "INSERT INTO sitepage_variations (SPM_ID, VARIATION_ID) VALUES ( {$id}, " . $variations[$i] . ")";
        $query = new query($db, $sql);
        $query->free();
    }
    return $id;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:40,代码来源:sitepage_master.php


示例5: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;

			// Authentification is require_onced for changing system configuration. Do not change.
			if ($auth->checkPermission("ADMINISTRATOR")) {

				// parent registration function for initializing. Do not change.
				Plugin::registration();

				// Name of the Plugin. The name will be displayed in the WCMS for selection
				$this->name = "PagingLinks";
				// A short description, what the Plugin is for.
				$this->description = "Add previous page - next page links to the website.";
				// Version of the plugin. Use integer numbers only. Is important for future releases.
				$this->version = 1;

				// Every module can have its own and individual META-Data in NX. The following Handler is
				// for creating a META-Data-Template and for assigning it to the Plugin.
				// IF you do not want to declare an individual META-Scheme, then set $mtid=0 and delete
				// everything between del1 and /del1!


				/**** change nothing beyond this point ****/
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$mtid  = nextGUID();	      
	
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', $this->pluginType)");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:33,代码来源:pgn_paginglinks.php


示例6: process

 /**
  * save the changes...
  */
 function process()
 {
     global $errors, $selected, $create, $sitepage_CLNID, $cluster_node_NAME, $db, $oid, $sid, $clt;
     $this->check();
     if ($selected != "0" && $sitepage_CLNID != "0" && $sitepage_CLNID != "") {
         $mid = getVar("mid");
         $sql = "UPDATE sitepage SET CLNID = {$sitepage_CLNID} WHERE SPID = {$oid}";
         $query = new query($db, $sql);
         $query->free();
         // reload page, now in editing mode...
         global $db;
         $db->close();
         header("Location: sitepagebrowser.php?sid={$sid}&mid={$mid}&action=editobject&go=update&oid={$oid}");
         exit;
     } else {
         if ($create != "0" && $errors == "") {
             $mid = getVar("mid");
             $nextId = nextGUID();
             $sql = "INSERT INTO cluster_node (CLNID, CLT_ID, NAME, DELETED) VALUES({$nextId}, {$clt}, '{$cluster_node_NAME}', 0)";
             $query = new query($db, $sql);
             $sql = "UPDATE sitepage SET CLNID = {$nextId} WHERE SPID = {$oid}";
             $query = new query($db, $sql);
             $query->free();
             $backup = $oid;
             $oid = $nextId;
             syncClusterVariations();
             $oid = $backup;
             global $db;
             $db->close();
             header("Location: sitepagebrowser.php?sid={$sid}&mid={$mid}&action=editobject&go=update&oid={$oid}");
             exit;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:37,代码来源:logic_selectcluster.inc.php


示例7: createRole

	/**
	 * Creates a role
	 *
	 * @param string NAme of the role to create
	 * @param string Description of the role to create
	 */
	function createRole($roleName, $roleDescription) {
		if (getDBCell("roles", "ROLE_ID", "UPPER(ROLE_NAME) = UPPER('$roleName')") == "") {
			global $db;

			$guid = nextGUID();
			$sql = "INSERT INTO roles (ROLE_ID, ROLE_NAME, DESCRIPTION) VALUES($guid, '$roleName', '$roleDescription')";
			$query = new query($db, $sql);
			$query->free();
		}
	}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:auth_access.php


示例8: syncLanguages

	function syncLanguages() {
	  global $db, $auth;
	  $variations = createDBCArray('variations', 'VARIATION_ID');
	  // enable languages in all templates
	  $spms = createDBCArray('sitepage_master', 'SPM_ID', 'VERSION=0');
	  for ($i=0; $i<count($spms); $i++) {
		for ($j=0; $j<count($variations); $j++) {
		  $check = getDBCell("sitepage_variations", "VARIATION_ID", "SPM_ID=".$spms[$i]." AND VARIATION_ID=".$variations[$j]);		  
		  if ($check=="") {		    
		  	$update = new query($db, 'INSERT INTO sitepage_variations (SPM_ID, VARIATION_ID) VALUES ('.$spms[$i].','.$variations[$j].')');
		  }	
		}
	  }
	  
	  // enable languages for all contents
	  $cids = createDBCArray("content", "CID", "VERSION=0");
	  for ($i=0; $i<count($cids); $i++) {
	  	$module = getDBCell("content", "MODULE_ID", "CID=".$cids[$i]);
	    for ($j=0; $j<count($variations); $j++) {
	      $check = getDBCell("content_variations", "VARIATION_ID", "CID=".$cids[$i]." AND VARIATION_ID=".$variations[$j]);
	      if ($check=="") {
		      $fk = nextGUID();
	  		  $sql = "INSERT INTO content_variations (CID, VARIATION_ID, FK_ID, DELETED) VALUES ( $cids[$i], $variations[$j], $fk, 0)";
              $PGNRef = createPGNRef($module, $fk);
              $PGNRef->sync();
              $update = new query($db, $sql);
	      }
	    }	  
	  }

	  // enable languages for all clusters
	  $clnids = createDBCArray('cluster_node', 'CLNID', 'VERSION=0 AND DELETED=0');
	  for ($i=0; $i<count($clnids); $i++) {
	  	for ($j=0; $j<count($variations); $j++) {
	  	  $check = getDBCell("cluster_variations", 'VARIATION_ID', 'CLNID='.$clnids[$i].' AND VARIATION_ID='.$variations[$j]);
	  	  if ($check=="") {
			$fk = nextGUID();
			$sql = "INSERT INTO cluster_variations (CLNID, VARIATION_ID, CLID, DELETED,CREATED_AT, CREATE_USER ) VALUES ( $clnids[$i], $variations[$j], $fk, 0, NOW()+0, '".$auth->userName."')";
	  	  	$update = new query($db, $sql);
	  	  	syncCluster($fk);
	  	  }
	  	}	  	
	  }
	  
	  // enable languages for all menutexts
	  $spids = createDBCArray("sitepage", "SPID", "VERSION=0 AND DELETED=0");
	  for ($i=0; $i<count($spids); $i++) {
	    for ($j=0; $j<count($variations); $j++) {
	      $check = getDBCell("sitepage_names", "VARIATION_ID", "VARIATION_ID= $variations[$j] AND SPID=$spids[$i]");
	      if ($check =="") {
	      	$update = new query($db, 'INSERT INTO sitepage_names (SPID,VARIATION_ID,NAME,HELP,DELETED,VERSION) VALUES ('.$spids[$i].','.$variations[$j].',"","",0,0)');
	      }		      
	    }	
	  }	  	  	  
	}	
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:55,代码来源:synchronize.php


示例9: registration

           /**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;
            		$this->name = "BulkImage";
            		$this->description = "System-Extensions for importing images in archives.";
            		$this->version = 1;
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, 0, '$classname', '$source', 3);");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:15,代码来源:pgn_bulkimage.php


示例10: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;	
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				$this->name = "CMS";
				$this->description = "CDS-API-Extension for creating, launching and editing Clusters.";
				$this->version = 1;
				$mtid = nextGUID(); // getting next GUID.
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', 3)");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:pgn_cms.php


示例11: registration

		/**
	     * Specifies information for installation and deinstallation of the plugin.
		 */
		function registration() {
			global $auth;	
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				$this->name = "E-Mail Obfuscator";
				$this->description = "Filters email-addresses form texts and recodes them to avoid spidering";
				$this->version = 1;
				$mtid = nextGUID(); // getting next GUID.
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', 4)");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:16,代码来源:pgn_emailobfuscator.php


示例12: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;	
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				$this->name = "Rate";
				$this->description = "CDS-API-Extension for rating items.";
				$this->version = 1;
				$mtid = nextGUID(); // getting next GUID.
				$this->installHandler->addDBAction("CREATE TABLE `pgn_rating` (  `RATINGID` bigint(20) NOT NULL auto_increment,  `SOURCEID` bigint(20) NOT NULL default '0',  `VOTE` tinyint(4) NOT NULL default '0',  `COMMENT` text NOT NULL,  `timestamp` timestamp(14) NOT NULL,  PSEUDO varchar(64) null, EMail varchar(128) null, Published tinyint(1) not null default 0, PRIMARY KEY  (`RATINGID`)) TYPE=MyISAM AUTO_INCREMENT=1 ;");
				$this->uninstallHandler->addDBAction("DROP TABLE `pgn_rating`");
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', 3)");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:18,代码来源:pgn_rate.php


示例13: execute

		/**
		 * generates and executes the Insert-Statement towards the database.
		 */
		function execute() {
			global $db, $errors, $temp_oid, $form;
			

			if ($this->pkval == "") {
			  $nextId = nextGUID();
			  $temp_oid = $nextId;			
			  $keys = "($this->pk";
			  $vals = "($nextId";
			  $commaflag = true;
			} else {
			  addInsert($this->table, $this->pk, $this->pkval, $this->pkdatatype);
			  $keys = "(";
			  $vals = "(";	
			  $commaflag = false;
			}
			
			$str = "INSERT INTO $this->table ";
			

			for ($i = 0; $i < $this->counter; $i++) {
				if ($commaflag) {
					$keys .= ", ";
					$vals .= ", ";
				}

				$keys .= $this->columns[$i];
				$vals .= $this->values[$i];
				$commaflag = true;
			}

			$str .= $keys . ") VALUES " . $vals . ")";

			global $debug;

			if ($debug == true)
				echo "SQL: $str <br>";

			$query = new query($db, $str);

			if (trim($db->error()) != "0:")
				$errors .= "-DBInsert";

			return $nextId;
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:48,代码来源:insertset.php


示例14: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;
            		$this->name = "Calendar";
            		$this->description = "CDS-API-Extension for creating calendars.";
            		$this->version = 1;
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				$mtid = nextGUID(); // getting next GUID.
                		$this->installHandler->addDBAction("CREATE TABLE `pgn_cal_appointment` (  `APID` bigint(20) NOT NULL default '0',  `CALID` bigint(20) NOT NULL default '0',  `CATID` bigint(20) NOT NULL default '0',  `TITLE` varchar(255) NOT NULL default '',  `DESCRIPTION` longtext default NULL,  `STARTDATE` date NOT NULL default '0000-00-00',  `STARTTIME` time NOT NULL default '00:00:00',  `ENDDATE` date NOT NULL default '0000-00-00',  `ENDTIME` time NOT NULL default '00:00:00',  `IMAGE` bigint(20) default NULL,  `LINK` bigint(20) default NULL, `VERSION` tinyint(4) NOT NULL default '0',  PRIMARY KEY  (`APID`)) TYPE=MyISAM;");
                		$this->installHandler->addDBAction("CREATE TABLE `pgn_cal_calendars` (  `CALID` bigint(20) NOT NULL default '0',  `NAME` varchar(64) NOT NULL default '',  PRIMARY KEY  (`CALID`),  UNIQUE KEY `NAME` (`NAME`)) TYPE=MyISAM;");
                		$this->installHandler->addDBAction("CREATE TABLE `pgn_cal_categories` (  `CATID` bigint(20) NOT NULL default '0',  `CALID` bigint(20) NOT NULL default '0',  `NAME` varchar(64) NOT NULL default '',  `DESCRIPTION` varchar(255) default NULL, `COLOR` varchar(8) NOT NULL default '#ffffff',  PRIMARY KEY  (`CATID`)) TYPE=MyISAM;");
                		$id1 = nextGUID();
                		$this->installHandler->addDBAction("INSERT INTO `pgn_cal_calendars` (`CALID`, `NAME`) VALUES (".$id1.", 'My Calendar');");
                		$this->installHandler->addDBAction("INSERT INTO `pgn_cal_categories` (`CATID`, `CALID`, `NAME`, `DESCRIPTION`, `COLOR`) VALUES (".nextGUID().", $id1, 'Event', 'Events are public. All visitors are welcome.', '#f0f0f0');");
                		$this->uninstallHandler->addDBAction("DROP TABLE `pgn_cal_categories`");
                		$this->uninstallHandler->addDBAction("DROP TABLE `pgn_cal_calendars`");
                		$this->uninstallHandler->addDBAction("DROP TABLE `pgn_cal_appointment`");
                		$this->uninstallHandler->addDBAction("DELETE FROM temp_vars WHERE NAME='calsel'");
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', 3);");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:26,代码来源:pgn_calendar.php


示例15: translateXmlGUID

/**
 * Translate an old into a new GUID
 * @param integer old GUID
 * @param boolean set AntiCycle
 */
function translateXmlGUID($oldId)
{
    global $db, $provider, $c;
    if ($oldId < 1000) {
        // System data.
        $out = $oldId;
    } else {
        if (strtoupper($provider) == strtoupper($c["provider"])) {
            // own data.
            $out = $oldId;
        } else {
            $provider = strtoupper(parseSQL($provider));
            resetDBCache();
            $out = getDBCell("syndication", "OUT_ID", "IN_ID = {$oldId} AND PROVIDER = '{$provider}'");
            if ($out == "") {
                $out = nextGUID();
                $sql = "INSERT INTO syndication (IN_ID, OUT_ID, PROVIDER) VALUES ({$oldId}, {$out}, '{$provider}')";
                $query = new query($db, $sql);
                $query->free();
            }
        }
    }
    return $out;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:29,代码来源:xmlapi_prepare.php


示例16: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;

			// Authentification is require_onced for changing system configuration. Do not change.
			if ($auth->checkPermission("ADMINISTRATOR")) {

				// parent registration function for initializing. Do not change.
				Plugin::registration();

				// Name of the Plugin. The name will be displayed in the WCMS for selection
				$this->name = "FeedReader";
				// A short description, what the Plugin is for.
				$this->description = "ATOM and RSS FeedReader.";
				// Version of the plugin. Use integer numbers only. Is important for future releases.
				$this->version = 1;

				// Every module can have its own and individual META-Data in NX. The following Handler is
				// for creating a META-Data-Template and for assigning it to the Plugin.
				// IF you do not want to declare an individual META-Scheme, then set $mtid=0 and delete
				// everything between del1 and /del1!

				/**** do not change from this point ****/
				$mtid = nextGUID(); // getting next GUID.
				//del1
				/**** add META-Data now ****/
				$guid = nextGUID();
				/**** end adding META-Data ****/
				// /del1

				// SQL for creating the tables in the database. Do not call, if you do not need any tables in the database 
				$this->installHandler->addDBAction("CREATE TABLE `pgn_feeds` (`FKID` BIGINT NOT NULL ,`FEEDURL` VARCHAR( 256 ) NULL ,`SHOWLINKS` TINYINT( 1 ) NOT NULL DEFAULT '0',`CHANNEL_CAT` BIGINT NOT NULL DEFAULT '0',`CHANNEL_TEMPLATE` BIGINT NOT NULL DEFAULT '0',`CHANNEL_OVERVIEW_PAGE` BIGINT NOT NULL DEFAULT '0',PRIMARY KEY ( `FKID` ) ) ENGINE = MYISAM ;");

				// SQL for deleting the tables from the database. 
				$this->uninstallHandler->addDBAction("DROP TABLE `pgn_feeds`");

				/**** change nothing beyond this point ****/
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source')");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:44,代码来源:pgn_feedreader.php


示例17: createClusterTemplateFigure

/**
 * Create a figure for a cluster-tempalte
 * @param string name of the figur
 * @param integer GUID of the Template
 * @param integer Position in the template
 * @param integer minimum cardinality of this figure
 * @param integer maximum cardinality of this figure
 * @param integer configuration value for this figure
 * @param integer type-ID of this figure (actually 1-8). Refer to table cluster_template_item_types
 */
function createClusterTemplateFigure($name, $clt, $position, $maxcard, $mincard, $config, $type)
{
    global $db;
    $name = makeCopyName("cluster_template_items", "NAME", parseSQL($name), "CLT_ID = {$clt}");
    $newId = nextGUID();
    $sql = "INSERT INTO cluster_template_items (CLTI_ID, CLT_ID, NAME, POSITION, MINCARD, MAXCARD, FKID, CLTITYPE_ID, DELETED, VERSION) VALUES ({$newId}, {$clt}, '{$name}', {$position}, {$mincard}, {$maxcard}, {$config}, {$type}, 0,0)";
    $query = new query($db, $sql);
    $query->free();
    return $newId;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:20,代码来源:cluster_template.php


示例18: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;

			// Authentification is require_onced for changing system configuration. Do not change.
			if ($auth->checkPermission("ADMINISTRATOR")) {

				// parent registration function for initializing. Do not change.
				Plugin::registration();

				// Name of the Plugin. The name will be displayed in the WCMS for selection
				$this->name = "Image";
				// A short description, what the Plugin is for.
				$this->description = "Image. Allowed formats are GIF, JPEG and PNG.";
				// Version of the plugin. Use integer numbers only. Is important for future releases.
				$this->version = 1;

				// Every module can have its own and individual META-Data in NX. The following Handler is
				// for creating a META-Data-Template and for assigning it to the Plugin.
				// IF you do not want to declare an individual META-Scheme, then set $mtid=0 and delete
				// everything between del1 and /del1!

				/**** do not change from this point ****/
				$mtid = nextGUID(); // getting next GUID.
				//del1
				$this->metaInstallHandler->addDBAction("INSERT INTO meta_templates (MT_ID, NAME, DESCRIPTION, INTERNAL) VALUES ($mtid, '$this->name PlugIn-Scheme', 'internally used for assigning $this->name plugin meta data', 1)");

				define("_TEXT", 1);
				define("_TEXTAREA", 2);
				define("_COLOR", 3);

				/**** add META-Data now ****/
				$guid = nextGUID();
				$this->metaInstallHandler->addDBAction("INSERT INTO meta_template_items (MTI_ID, MT_ID, NAME, POSITION, MTYPE_ID) VALUES($guid, $mtid, 'Image Description', 1, " . _TEXTAREA . ")");

				/**** end adding META-Data ****/
				// /del1

				// SQL for creating the tables in the database. Do not call, if you do not need any tables in the database 
				$this->installHandler->addDBAction("CREATE TABLE pgn_image (FKID bigint(20) NOT NULL default '0', FILENAME varchar(32) default NULL, ALT varchar(64) default NULL, WIDTH smallint(6) default NULL, HEIGHT smallint(6) default NULL, COPYRIGHT varchar(64) default NULL, PRIMARY KEY  (FKID), UNIQUE KEY FKID (FKID)) TYPE=MyISAM;");

				// SQL for deleting the tables from the database. 
				$this->uninstallHandler->addDBAction("DROP TABLE `pgn_image`");

				/**** change nothing beyond this point ****/
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname','$source')");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:52,代码来源:pgn_image.php


示例19: registration

		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;

			// Authentification is require_onced for changing system configuration. Do not change.
			if ($auth->checkPermission("ADMINISTRATOR")) {

				// parent registration function for initializing. Do not change.
				Plugin::registration();

				// Name of the Plugin. The name will be displayed in the WCMS for selection
				$this->name = "Quote";
				// A short description, what the Plugin is for.
				$this->description = "Quote of the day";
				// Version of the plugin. Use integer numbers only. Is important for future releases.
				$this->version = 1;

				// Every module can have its own and individual META-Data in NX. The following Handler is
				// for creating a META-Data-Template and for assigning it to the Plugin.
				// IF you do not want to declare an individual META-Scheme, then set $mtid=0 and delete
				// everything between del1 and /del1!

				/**** do not change from this point ****/
				$mtid = nextGUID(); // getting next GUID.
				$rlid = nextGUID(); // getting next GUID.

				// SQL for creating the tables in the database. Do not call, if you do not need any tables in the database 
				$sql1 = "CREATE TABLE pgn_quote ( QUOTE_ID bigint(20) NOT NULL default '0',  QUOTE text,  TITLE varchar(64) NOT NULL default '',  PRIMARY KEY  (QUOTE_ID))";

				$this->installHandler->addDBAction($sql1);
				$this->installHandler->addDBAction("INSERT INTO roles (ROLE_ID, ROLE_NAME, DESCRIPTION) VALUES ($rlid, 'Quoter', 'This role is for editing quotes.')");

				// SQL for deleting the tables from the database. 
				$this->uninstallHandler->addDBAction("DROP TABLE `pgn_quote`");
				$this->uninstallHandler->addDBAction("DELETE FROM roles WHERE ROLE_NAME = 'Quoter'");

				/**** change nothing beyond this point ****/
				global $source, $classname; // the source path has to be provided by the calling template
				$modId = nextGUID();
				$this->installHandler->addDBAction("INSERT INTO modules (MODULE_ID, MODULE_NAME, DESCRIPTION, VERSION, MT_ID, CLASS, SOURCE, MODULE_TYPE_ID) VALUES ($modId, '$this->name', '$this->description', $this->version, $mtid, '$classname', '$source', $this->pluginType)");
			}
		}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:44,代码来源:pgn_quote.php


示例20: copyClusterContent

/**
 * Makes copy of cluster's content
 * 
 * @param integer Old CLID ID
 * @param integer New CLID ID
 */
function copyClusterContent($oldClid, $newClid)
{
    global $db;
    $clcid = createDBCArray("cluster_content", "CLCID", "CLID = {$oldClid}");
    for ($i = 0; $i < count($clcid); $i++) {
        $values["CLCID"] = nextGUID();
        $values["CLID"] = $newClid;
        copyRow("cluster_content", "CLCID=" . $clcid[$i], $values);
        // now do it for the plugin :-)
        $clti = getDBCell("cluster_content", "CLTI_ID", "CLCID =" . $clcid[$i]);
        $cltitype = getDBCell("cluster_template_items", "CLTITYPE_ID", "CLTI_ID={$clti}");
        if ($cltitype == 2) {
            $mod = getDBCell("cluster_template_items", "FKID", "CLTI_ID={$clti}");
            $classname = getDBCell("modules", "CLASS", "MODULE_ID = {$mod}");
            if ($classname != "") {
                $ref = new $classname($clcid[$i]);
                $sql = $ref->copyRecord($values["CLCID"]);
                $query = new query($db, $sql);
                $query->free();
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:29,代码来源:copy_tree.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nextRow函数代码示例发布时间:2022-05-15
下一篇:
PHP nextAccessToken函数代码示例发布时间: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