Author: pwang
Date: 2012-05-03 16:01:21 -0700 (Thu, 03 May 2012)
New Revision: 29099
Added:
new_cytoscape_website/plugin_website/plugins/getPluginURLs.php
Log:
Original creation
Added: new_cytoscape_website/plugin_website/plugins/getPluginURLs.php
===================================================================
--- new_cytoscape_website/plugin_website/plugins/getPluginURLs.php
(rev 0)
+++ new_cytoscape_website/plugin_website/plugins/getPluginURLs.php
2012-05-03 23:01:21 UTC (rev 29099)
@@ -0,0 +1,83 @@
+<?php
+include 'clean.inc';
+
+//$uniqueID = cleanInt($_GET['uniqueID']);
+$name = $_GET['name'];
+
+// Include the DBMS credentials
+include 'db.inc';
+
+// Connect to the MySQL DBMS
+if (!($connection = @ mysql_pconnect($dbServer, $dbUser, $dbPass)))
+ showerror();
+
+// Use the CyPluginDB database
+if (!mysql_select_db($dbName, $connection))
+ showerror();
+
+
+$returnResult='';
+
+$query = 'SELECT project_url FROM plugin_list WHERE plugin_list.name =
'."'$name'";
+
+// Run the query
+if (!($pluginList = @ mysql_query ($query, $connection)))
+ showerror();
+
+// Did we get back any rows?
+if (@ mysql_num_rows($pluginList) != 0)
+{
+
+ $pluginList_row = @ mysql_fetch_array($pluginList);
+ $project_url = $pluginList_row["project_url"];
+
+ if ($project_url == ''){
+ $project_url = 'NULL';
+ }
+
+ $returnResult = 'project_url='.$project_url.'<br>';
+}
+
+
+///
+$query = 'SELECT version, source_url, release_note_url FROM
plugin_list,plugin_version WHERE plugin_list.plugin_auto_id =
plugin_version.plugin_id '.
+ " AND name = '".$name."'";
+
+
+// Run the query
+if (!($queryResult = @ mysql_query ($query, $connection)))
+ showerror();
+
+
+$versionCount = @ mysql_num_rows($queryResult);
+
+
+while ($versionCount > 0) {
+
+
+ $versionSpecific_row = @ mysql_fetch_array($queryResult);
+
+ if ($versionSpecific_row["version"] != null) {
+ $returnResult .= "version=" .
$versionSpecific_row["version"].'<br>';
+
+ if ($versionSpecific_row["source_url"] != ''){
+ $returnResult .= "source_url=" .
$versionSpecific_row["source_url"].'<br>';
+ }
+ else {
+ $returnResult .= "source_url=NULL".'<br>';
+ }
+
+ if ($versionSpecific_row["release_note_url"] != ''){
+ $returnResult .= "release_note_url=" .
$versionSpecific_row["release_note_url"].'<br>';
+ }
+ else {
+ $returnResult .= "release_note_url=NULL".'<br>';
+ }
+ }
+
+ $versionCount = $versionCount -1;
+}
+
+echo $returnResult;
+
+?>
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.