You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ro...@apache.org on 2004/11/11 02:15:37 UTC

cvs commit: jakarta-jetspeed-2/applications/php/src/webapp/hosts install.php index.php

rogerrut    2004/11/10 17:15:37

  Modified:    applications/php/src/webapp/hosts/code hosts.php
                        interfaces.php services.php
               applications/php/src/webapp/WEB-INF web.xml portlet.xml
               applications/php project.xml
               applications/php/src/webapp/hosts install.php index.php
  Log:
  Moving PHP portlet into portal-bridges/php
  Added PortletActions to handle navigation through the PHP application
  The PHP portlet can be invoked from another portlet passing PHPParameters in a session or through actions inside the PHP portlet.
  The PHP portlet remembers its state (last execution)
  The start page is defined as an INIT params
  
  Revision  Changes    Path
  1.2       +15 -15    jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/hosts.php
  
  Index: hosts.php
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/hosts.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hosts.php	21 Jul 2004 17:47:07 -0000	1.1
  +++ hosts.php	11 Nov 2004 01:15:36 -0000	1.2
  @@ -58,12 +58,12 @@
   	echo '
   <table width=100% bgcolor=#dddddd cellpadding=5 celspacing=0 border=0>
   <tr>
  -<td class=head><a class=head href=/PHP/hosts/index.php?pagedest=hosts&order=id&sort='.$newsort.'>Id</td>
  -<td class=head><a class=head href=/PHP/hosts/index.php?pagedest=hosts&order=name&sort='.$newsort.'>Name</td>
  -<td class=head><a class=head href=/PHP/hosts/index.php?pagedest=hosts&order=address&sort='.$newsort.'>Address</td>
  -<td class=head><a class=head href=/PHP/hosts/index.php?pagedest=hosts&order=os&sort='.$newsort.'>OS</td>
  +<td class=head><a class=head href=hosts/index.php?pagedest=hosts&order=id&sort='.$newsort.'>Id</td>
  +<td class=head><a class=head href=hosts/index.php?pagedest=hosts&order=name&sort='.$newsort.'>Name</td>
  +<td class=head><a class=head href=hosts/index.php?pagedest=hosts&order=address&sort='.$newsort.'>Address</td>
  +<td class=head><a class=head href=hosts/index.php?pagedest=hosts&order=os&sort='.$newsort.'>OS</td>
   <td class=head>Serial</td>
  -<td class=head><a class=head href=/PHP/hosts/index.php?pagedest=hosts&order=type&sort='.$newsort.'>Type</td>
  +<td class=head><a class=head href=hosts/index.php?pagedest=hosts&order=type&sort='.$newsort.'>Type</td>
   <td class=head colspan=3>Manage</td>
   </tr>';
   	$class = 'row1';
  @@ -73,14 +73,14 @@
   		echo '
   		<tr>
   		<td class='.$class.'>'.$row[0].'</td>
  -		<td class='.$class.'><a class=std href=/PHP/hosts/index.php?pagedest=hosts&task=detail&id='.$row[0].'>'.$row[1].'</a></td>
  +		<td class='.$class.'><a class=std href=hosts/index.php?pagedest=hosts&task=detail&id='.$row[0].'>'.$row[1].'</a></td>
   		<td class='.$class.'>'.$row[2].'</td>
   		<td class='.$class.'>'.$row[3].'</td>
   		<td class='.$class.'>'.$row[4].'</td>
   		<td class='.$class.'>'.$row[5].'</td>
  -		<td class='.$class.'><a class=std href=/PHP/hosts/index.php?pagedest=hosts&task=detail&id='.$row[0].'>Services / Interfaces</a></td>
  -		<td class='.$class.'><a class=std href=/PHP/hosts/index.php?pagedest=hosts&task=edit&id='.$row[0].'>Edit</a></td>
  -		<td class='.$class.'><a class=std href=/PHP/hosts/index.php?pagedest=hosts&task=delete&id='.$row[0].'>Delete</a></td>
  +		<td class='.$class.'><a class=std href=hosts/index.php?pagedest=hosts&task=detail&id='.$row[0].'>Services / Interfaces</a></td>
  +		<td class='.$class.'><a class=std href=hosts/index.php?pagedest=hosts&task=edit&id='.$row[0].'>Edit</a></td>
  +		<td class='.$class.'><a class=std href=hosts/index.php?pagedest=hosts&task=delete&id='.$row[0].'>Delete</a></td>
   		</tr>';
   		if ($class == 'row1')
   			$class = 'row2';
  @@ -101,7 +101,7 @@
   			formSuccess('Host '.$name.' added.');
   		}
   	} else {
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Add Host';
   		$rows = array();
   		$row = array('hidden', 'pagedest', '/hosts');
  @@ -139,7 +139,7 @@
   		}
   	} else {
   		$info = getHostInfo($id);
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Modify Host';
   		$rows = array();
   		$row = array('hidden', 'id', $id);
  @@ -214,7 +214,7 @@
   <td width=20% align=right><b>IP address:</b></td>
   <td align=left><b>'.$info[1].'</b></td>
   <td align=right rowspan=4>
  -	<form action=/PHP/hosts/index.php method=get>
  +	<form action=hosts/index.php method=get>
   	<input type=hidden name=pagedest value=hosts>
   	<input type=hidden name=task value=edit>
   	<input type=hidden name=id value='.$id.'>
  @@ -222,7 +222,7 @@
   	</form>
   </td>
   <td align=left rowspan=4>
  -	<form action=/PHP/hosts/index.php method=get>
  +	<form action=hosts/index.php method=get>
   	<input type=hidden name=pagedest value=hosts>
   	<input type=hidden name=task value=detail>
   	<input type=hidden name=id value='.$id.'>
  @@ -283,7 +283,7 @@
   </table>
   <tr>
   <td '.$colspan.' align=left>
  -<form action=/PHP/hosts/index.php method=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=/hosts>
   <input type=hidden name=task value=services>
   <input type=hidden name=id value='.$id.'>
  @@ -329,7 +329,7 @@
   </table>
   <tr>
   <td '.$colspan.' align=left>
  -<form action=/PHP/hosts/index.php method=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=/hosts>
   <input type=hidden name=task value=interfaces>
   <input type=hidden name=id value='.$id.'>
  
  
  
  1.2       +4 -4      jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/interfaces.php
  
  Index: interfaces.php
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/interfaces.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- interfaces.php	21 Jul 2004 17:47:07 -0000	1.1
  +++ interfaces.php	11 Nov 2004 01:15:36 -0000	1.2
  @@ -44,8 +44,8 @@
   		<tr>
   		<td class='.$class.'>'.$row[0].'</td>
   		<td class='.$class.'>'.$row[1].'</td>
  -		<td class='.$class.' width=10% align=center><a class=std href=/PHP/hosts/index.php?pagedest=interfaces&task=edit&id='.$row[0].'>edit</td>
  -		<td class='.$class.' width=10% align=center><a class=std href=/PHP/hosts/index.php?pagedest=interfaces&task=delete&id='.$row[0].'>delete</td>
  +		<td class='.$class.' width=10% align=center><a class=std href=hosts/index.php?pagedest=interfaces&task=edit&id='.$row[0].'>edit</td>
  +		<td class='.$class.' width=10% align=center><a class=std href=hosts/index.php?pagedest=interfaces&task=delete&id='.$row[0].'>delete</td>
   		</tr>';
   		if ($class == 'row1')
   			$class = 'row2';
  @@ -67,7 +67,7 @@
   			formSuccess('Service '.$name.' added.');
   		}
   	} else {
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Add Interface';
   		$rows = array();
   		$row = array('hidden', 'pagedest', 'interfaces');
  @@ -97,7 +97,7 @@
   		}
   	} else {
   		$info = getInterfaceInfo($id);
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Modify Interface';
   		$rows = array();
   		$row = array('hidden', 'pagedest', 'interfaces');
  
  
  
  1.2       +4 -4      jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/services.php
  
  Index: services.php
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/hosts/code/services.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- services.php	21 Jul 2004 17:47:07 -0000	1.1
  +++ services.php	11 Nov 2004 01:15:36 -0000	1.2
  @@ -43,8 +43,8 @@
   		<tr>
   		<td class='.$class.'>'.$row[0].'</td>
   		<td class='.$class.'>'.$row[1].'</td>
  -		<td class='.$class.' width=10% align=center><a class=std href=/PHP/hosts/index.php?pagedest=services&task=edit&id='.$row[0].'>edit</td>
  -		<td class='.$class.' width=10% align=center><a class=std href=/PHP/hosts/index.php?pagedest=services&task=delete&id='.$row[0].'>delete</td>
  +		<td class='.$class.' width=10% align=center><a class=std href=hosts/index.php?pagedest=services&task=edit&id='.$row[0].'>edit</td>
  +		<td class='.$class.' width=10% align=center><a class=std href=hosts/index.php?pagedest=services&task=delete&id='.$row[0].'>delete</td>
   		</tr>';
   		if ($class == 'row1')
   			$class = 'row2';
  @@ -66,7 +66,7 @@
   			formSuccess('Service '.$name.' added.');
   		}
   	} else {
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Add Service';
   		$rows = array();
   		$row = array('hidden', 'pagedest', 'services');
  @@ -96,7 +96,7 @@
   		}
   	} else {
   		$info = getServiceInfo($id);
  -		$action = "/PHP/hosts/index.php";
  +		$action = "hosts/index.php";
   		$title = 'Modify Service';
   		$rows = array();
   		$row = array('hidden', 'pagedest', 'services');
  
  
  
  1.3       +3 -36     jakarta-jetspeed-2/applications/php/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/WEB-INF/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml	21 Jul 2004 23:36:17 -0000	1.2
  +++ web.xml	11 Nov 2004 01:15:36 -0000	1.3
  @@ -17,39 +17,6 @@
   limitations under the License.
   -->
   <web-app>
  - <display-name>PHP Portlets</display-name>
  - <description>PHP Portlets</description>
  - <servlet>
  -	    <servlet-name>
  -	      jetspeed-php
  -	    </servlet-name>
  -	    <servlet-class>
  -	      org.apache.jetspeed.portlets.php.phpRedirectorServlet
  -	    </servlet-class>
  -	  </servlet>
  -	  	  
  - <servlet>
  -    <servlet-name>JetspeedContainer</servlet-name>
  -    <display-name>Jetspeed Container</display-name>
  -    <description>MVC Servlet for Jetspeed Portlet Applications</description>
  -    <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
  -  </servlet>
  -
  -  <servlet-mapping>
  -    <servlet-name>
  -      jetspeed-php
  -    </servlet-name>
  -    <url-pattern>
  -      *.php
  -    </url-pattern>
  -  </servlet-mapping>
  -
  -  <servlet-mapping>
  -     <servlet-name>
  -        JetspeedContainer
  -     </servlet-name>
  -     <url-pattern>
  -       /container/*
  -     </url-pattern>
  -  </servlet-mapping>
  -</web-app>
  \ No newline at end of file
  +	 <display-name>PHP Portlets</display-name>
  +	 <description>PHP Demo Portlet</description>
  + </web-app>
  \ No newline at end of file
  
  
  
  1.2       +4 -4      jakarta-jetspeed-2/applications/php/src/webapp/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/WEB-INF/portlet.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- portlet.xml	21 Jul 2004 17:47:06 -0000	1.1
  +++ portlet.xml	11 Nov 2004 01:15:36 -0000	1.2
  @@ -18,15 +18,15 @@
   	<portlet id="php-demo">
   	<init-param>
         <name>ServletContextProvider</name>
  -      <value>org.apache.jetspeed.portlets.php.PHPServletContextProviderImpl</value>
  +      <value>org.apache.portals.bridges.php.PHPServletContextProviderImpl</value>
       </init-param>
       <init-param>
  -      <name>application</name>
  -      <value>hosts</value>
  +      <name>StartPage</name>
  +      <value>hosts/index.php</value>
       </init-param>
       	<portlet-name>php-demo</portlet-name>
       	<display-name>PHP demo Portlet</display-name>
  -    	<portlet-class>org.apache.jetspeed.portlets.php.PHPApplicationPortlet</portlet-class>
  +    	<portlet-class>org.apache.portals.bridges.php.PHPApplicationPortlet</portlet-class>
   	    <expiration-cache>-1</expiration-cache>
       	<supports>
   	      <mime-type>text/html</mime-type>
  
  
  
  1.4       +22 -44    jakarta-jetspeed-2/applications/php/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	18 Aug 2004 01:11:47 -0000	1.3
  +++ project.xml	11 Nov 2004 01:15:36 -0000	1.4
  @@ -16,12 +16,29 @@
     </repository>
   
     <dependencies>
  +  <dependency>
  +		<id>portals-bridges:portals-bridges-php</id>
  +	    <version>0.1</version>
  +	     <type>jar</type>
  +	    <properties>
  +	    	<war.bundle>true</war.bundle>
  +	    </properties>
  +	</dependency> 
  +	<dependency>
  +		<id>portals-bridges:portals-bridges-common</id>
  +	    <version>0.1</version>
  +	     <type>jar</type>
  +	    <properties>
  +	    	<war.bundle>true</war.bundle>
  +	    </properties>
  +	</dependency> 
       <dependency>
  -      <id>itgroundwork</id>
  +      <id>itgroundwork:phpportlet</id>
  +      <version>1.0</version>
  +      <type>jar</type>
         <properties>
           <war.bundle.jar>true</war.bundle.jar>
         </properties>
  -      <jar>phpportlet.jar</jar>
       </dependency>
       <dependency>
         <id>portlet-api</id>
  @@ -38,20 +55,7 @@
           <war.bundle>true</war.bundle>
         </properties>
       </dependency>
  -    <dependency>
  -      <id>taglibs:standard</id>
  -      <version>1.0.2</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <id>taglibs:request</id>
  -      <version>1.0.1</version>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  +    
       <dependency>
         <id>servletapi</id>
         <version>2.3</version>
  @@ -59,24 +63,7 @@
           <war.bundle>false</war.bundle>
         </properties> 
       </dependency>
  -    <dependency>
  -      <id>jetspeed-commons</id>
  -      <groupId>jetspeed2</groupId>
  -      <version>2.0-a1-dev</version>
  -      <properties>
  -        <war.bundle>false</war.bundle>
  -      </properties>
  -    </dependency>
  -    <!-- warred jars -->
  -    <dependency>
  -      <groupId>commons-beanutils</groupId>
  -      <artifactId>commons-beanutils</artifactId>
  -      <version>1.6.1</version>
  -      <url>http://jakarta.apache.org/commons/beanutils.html</url>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  +    
       <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
  @@ -118,15 +105,6 @@
         <artifactId>commons-validator</artifactId>
         <version>1.1.2</version>
         <url>http://jakarta.apache.org/commons/validator/</url>
  -      <properties>
  -        <war.bundle>true</war.bundle>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>oro</groupId>
  -      <artifactId>oro</artifactId>
  -      <version>2.0.7</version>
  -      <url>http://jakarta.apache.org/oro/</url>
         <properties>
           <war.bundle>true</war.bundle>
         </properties>
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/applications/php/src/webapp/hosts/install.php
  
  Index: install.php
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/hosts/install.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- install.php	21 Jul 2004 17:47:06 -0000	1.1
  +++ install.php	11 Nov 2004 01:15:36 -0000	1.2
  @@ -21,7 +21,7 @@
   <title> Hosts Installation </title>
   <meta name="Author" content="Scott Parris">
   <meta name="Description" content="GroundWork Hosts Installation">
  -<link rel="stylesheet" type="text/css" href="conf/style.css" />
  +<link rel="stylesheet" type="text/css" href="/PHP/css/style.css" />
   </head>
   <body>
   <table width=70% align="center" cellpadding=5 cellspacing=0 border=1>
  
  
  
  1.2       +13 -13    jakarta-jetspeed-2/applications/php/src/webapp/hosts/index.php
  
  Index: index.php
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/applications/php/src/webapp/hosts/index.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.php	21 Jul 2004 17:47:06 -0000	1.1
  +++ index.php	11 Nov 2004 01:15:36 -0000	1.2
  @@ -1,6 +1,6 @@
   <?php
   /*******************************************************************************
  -**	file:	/PHP/hosts/index.php
  +**	file:	hosts/index.php
   ********************************************************************************
   **	author:	Scott Parris
   **	date:	2004/6/2
  @@ -36,13 +36,13 @@
   &nbsp;
   </td>
   <td class=head align=left>
  -<a class=head href=/PHP/hosts/index.php>Hosts</a>
  +<a class=head href=hosts/index.php>Hosts</a>
   </td>
   <td class=head align=left>
  -<a class=head href=/PHP/hosts/index.php?pagedest=services>Services</a>
  +<a class=head href=hosts/index.php?pagedest=services>Services</a>
   </td>
   <td class=head align=left>
  -<a class=head href=/PHP/hosts/index.php?pagedest=interfaces>Interfaces</a>
  +<a class=head href=hosts/index.php?pagedest=interfaces>Interfaces</a>
   </td>
   <td class=head align=center>
   &nbsp;
  @@ -77,7 +77,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=services>
   <input type=hidden name=task value=add>
   <input type=submit name=submit value="Add Service">
  @@ -86,7 +86,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=services>
   <input type=hidden name=task value=show>
   <input type=submit name=submit value="List Services">
  @@ -121,7 +121,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=interfaces>
   <input type=hidden name=task value=add>
   <input type=submit name=nedi value="Add Interface">
  @@ -131,7 +131,7 @@
   <tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=interfaces>
   <input type=hidden name=task value=show>
   <input type=submit name=nedi value="List Interfaces">
  @@ -190,7 +190,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=hosts>
   <input type=hidden name=task value=add>
   <input type=submit name=nedi value="Add Host">
  @@ -199,7 +199,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=hosts>
   <input type=hidden name=task value=show>
   <input type=submit name=nedi value="List Hosts">
  @@ -213,7 +213,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=discovery>
   <input type=submit name=nedi value="Discover Device(s)">
   </form>
  @@ -221,7 +221,7 @@
   </tr>
   <tr>
   <td class=nav align=middle>
  -<form action=/PHP/hosts/index.php methot=get>
  +<form action=hosts/index.php method=get>
   <input type=hidden name=pagedest value=nagios>
   <input type=submit name=nagios value="Gen Nagios Conf">
   </form>
  @@ -253,7 +253,7 @@
   			$main = ' ';
   			break;
   		default:
  -			$main = "code//hosts.php";
  +			$main = "code/hosts.php";
   			break;
   	}
   	return $main;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org