Exemplo n.º 1
0
/**
 * 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);
        }
    }
}
Exemplo n.º 2
0
/**
 * 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;
    }
}
		/**
		   * 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)");				
			}
		}
/**
 * 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;
}
		/**
		   * 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)");
			}
		}
 /**
  * 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;
         }
     }
 }
Exemplo n.º 7
0
	/**
	 * 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();
		}
	}
Exemplo n.º 8
0
	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)');
	      }		      
	    }	
	  }	  	  	  
	}	
Exemplo n.º 9
0
           /**
		   * 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);");
			}
		}
Exemplo n.º 10
0
		/**
		   * 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)");
			}
		}
		/**
		   * Specifies information for installation and deinstallation of the plugin.
		   */
		function registration() {
			global $auth;	
			if ($auth->checkPermission("ADMINISTRATOR")) {
				Plugin::registration();
				$this->name = "CDSTextImageCreator";
				$this->description = "Class-3-Plugin for extending the CDS with a function for painting text-images on the fly.";
				$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)");
			}
		}
		/**
	     * 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)");
			}
		}
Exemplo n.º 13
0
		/**
		   * 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)");
			}
		}
Exemplo n.º 14
0
		/**
		 * 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;
		}
Exemplo n.º 15
0
		/**
		   * 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);");
			}
		}
Exemplo n.º 16
0
/**
 * 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;
}
Exemplo n.º 17
0
		/**
		   * 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')");
			}
		}
/**
 * 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;
}
Exemplo n.º 19
0
		/**
		   * 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')");
			}
		}
Exemplo n.º 20
0
		/**
		   * 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)");
			}
		}
Exemplo n.º 21
0
/**
 * 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();
            }
        }
    }
}
Exemplo n.º 22
0
        $errorfields[] = 'title';
    }
    if (empty($_POST['url'])) {
        $errormessages[] = 'You must enter an URL.';
        $errorfields[] = 'url';
    }
    if (empty($_POST['backlink'])) {
        $errormessages[] = 'Please enter a backlink. If you cannot provide a backlink, then type a "no backlink". However we can add your site only on certain circumstances then.';
        $errorfields[] = 'backlink';
    }
    if (empty($_POST['description'])) {
        $errormessages[] = 'Please enter a description';
        $errorfields[] = 'description';
    }
    if (count($errorfields) == 0) {
        $nid = nextGUID();
        $sql = "INSERT INTO pgn_linkexchange (ID,TITLE,EMAIL,USERNAME,URL,RECIPROCALURL,SOURCEID,DESCRIPTION,INSERTTIMESTAMP) VALUES ";
        $sql .= "({$nid},'" . value("title") . "','" . value('email') . "','" . value("name") . "','" . value("url") . "','" . value("backlink") . "',{$id},'" . value("description") . "',now() )";
        $query = new query($db, $sql);
        $entryadded = true;
    }
}
?>
 

<?php 
if ($entryadded) {
    echo 'The entry was added to the database.';
} else {
    if (count($_POST) > 0 && !empty($errormessages)) {
        if (get_magic_quotes_gpc()) {
Exemplo n.º 23
0
		/**
		   * 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 = "File";
				// A short description, what the Plugin is for.
				$this->description = "File Uploads. Accepts all type of files.";
				// 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!
				$mtid = nextGUID();

				// 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_file` (`FKID` BIGINT NOT NULL ,`NAME` VARCHAR( 64 ) NOT NULL ,`DESCRIPTION` VARCHAR( 255 ) ,`FILENAME` VARCHAR( 255 ) ,`FILETYPE` VARCHAR( 32 ) ,`LOCATION` VARCHAR( 128 ), `DOWNLOADS` BIGINT ,PRIMARY KEY ( `FKID` ))");

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

				/**** 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')");
			}
		}
Exemplo n.º 24
0
	/**
	 * 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
	}
		/**
		   * 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 = "Linkexchange";
				// A short description, what the Plugin is for.
				$this->description = "Enables a visitor to place reciprocal links on his 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("CREATE TABLE `pgn_linkexchange` (`ID` BIGINT NOT NULL , `SOURCEID` BIGINT NOT NULL, `TITLE` VARCHAR( 256 ) NULL ,`URL` VARCHAR( 256 ) NULL ,`DESCRIPTION` VARCHAR( 1024 ) NULL ,`INSERTTIMESTAMP` DATETIME NOT NULL ,`EMAIL` VARCHAR( 128 ) NULL ,`KEYWORDS` VARCHAR( 1024 ) NULL ,`USERNAME` VARCHAR( 64 ) NULL ,`PASSWORD` VARCHAR( 64 ) NULL ,`RECIPROCALURL` VARCHAR( 256 ) NULL,APPROVED TINYINT(1) NOT NULL DEFAULT 0 ,PRIMARY KEY ( `ID` )) ENGINE = MYISAM ;");
				
				$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)");
			}
		}
Exemplo n.º 26
0
		/**
		   * 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 = "Code Sniplets";
				// A short description, what the Plugin is for.
				$this->description = "PHP, HTML or Javascript sniplets.";
				// 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_sniplet` (`FKID` BIGINT NOT NULL ,`SNIPLET` TEXT NULL, `SNIPLETTYPE` TINYINT NULL ) TYPE = MYISAM");

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

				/**** 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)");
			}
		}
Exemplo n.º 27
0
		/**
		   * 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 = "Adsense";
				// A short description, what the Plugin is for.
				$this->description = "Google Adsense Ad-Management Plugin.";
				// 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 
				$this->installHandler->addDBAction("CREATE TABLE `pgn_adsense` (`FKID` BIGINT NOT NULL ,`ADTEXT` TEXT NULL ,`IMPRESSIONS` BIGINT NOT NULL DEFAULT '0',`CLICKS` BIGINT NOT NULL DEFAULT '0',PRIMARY KEY ( `FKID` ) );");
				

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

				/**** 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')");
			}
		}
Exemplo n.º 28
0
/**
 * Assure, that the article is existant in given variation
 * @param integer Article-ID
 * @param integer Variation-ID
 */
function syncArticleVariation($articleId, $variation)
{
    global $db, $auth;
    $clid = getDBCell("cluster_variations", "CLID", "CLNID = {$articleId} AND VARIATION_ID = {$variation}");
    if ($clid != "") {
        $sql = "UPDATE cluster_variations SET DELETED=0 WHERE CLNID = {$articleId} AND VARIATION_ID = {$variation}";
    } else {
        $clid = nextGUID();
        $sql = "INSERT INTO cluster_variations (CLNID, VARIATION_ID, CLID, DELETED,CREATED_AT, CREATE_USER, LAST_CHANGED, LAST_USER ) VALUES ( {$articleId}, {$variation}, {$clid}, 0, NOW()+0, '" . $auth->userName . "', NOW()+0, '" . $auth->userName . "')";
    }
    $query = new query($db, $sql);
    $query->free();
    return $clid;
}
		/**
		 * Create new items
		 */
		function createItems() {
			global $db;				
			$allowed_number = ($this->maxcard - count($this->members));
			if ($allowed_number < 0) $allowed_number = 0;
			$number_of_instances = value("number_of_instances".$this->clti, "NUMERIC");
			if ($allowed_number < $number_of_instances)$number_of_instances = $allowed_number;
				
			$newpos = getMax("cluster_content", "POSITION", "CLTI_ID = $this->clti AND CLID = $this->cl") + 1;
			if ($newpos < 1) $newpos=1;
			$created = false;	
			for ($i=0; $i < $number_of_instances; $i++) {
				$nextId = nextGUID();
				$ssql = "INSERT INTO cluster_content (CLCID, CLID, CLTI_ID, POSITION, TITLE, FKID, DELETED) VALUES ";
				$ssql .= "($nextId, $this->cl, $this->clti, $newpos+$i, '', 0, 0)";
				$synq = new query($db, $ssql);
				$this->createReferencedItem($nextId);
				$created = true;
			}
			if ($created) $this->members = $this->getItemData();
		}
		/**
		   * 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 = "Knowledgebase";
				// A short description, what the Plugin is for.
				$this->description = "Knowledgebase for your 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!

				/**** do not change from this point ****/
				$mtid = 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_knowledgebase` (`ID` BIGINT NOT NULL ,`TITLE` VARCHAR( 255 ) NOT NULL ,`DESCRIPTION` TEXT NULL ,`UPDATEUSER` VARCHAR( 64 ) NULL ,`UPDATETIMESTAMP` DATETIME NULL ,`ENABLED` TINYINT( 1 ) NULL DEFAULT '0',PRIMARY KEY ( `ID` ))";							
				$sql2 = "CREATE TABLE `pgn_knowledgebase_tags` (`TAG_ID` BIGINT NOT NULL ,`TAG` CHAR( 32 ) NOT NULL ,`TAG_CAT` INT( 3 ) NOT NULL ,PRIMARY KEY ( `TAG_ID` ) ,INDEX ( `TAG` ) ) TYPE = MYISAM ;";
				$sql3 = "CREATE TABLE `pgn_knowledgebase_tag_relation` (`TAG_ID` BIGINT NOT NULL ,`FK_ID` BIGINT NOT NULL ,`POSITION` INT( 3 ) NULL ,INDEX ( `TAG_ID` , `FK_ID` ) ) TYPE = MYISAM ;";

				$this->installHandler->addDBAction($sql1);
				$this->installHandler->addDBAction($sql2);
				$this->installHandler->addDBAction($sql3);

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

				/**** 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)");
			}
		}