~katiekitty/+junk/solidstate

« back to all changes in this revision

Viewing changes to solidstate/trunk/manager/pages/.svn/text-base/ServicesHostingServicesPage.class.php.svn-base

  • Committer: root
  • Date: 2010-01-13 07:44:31 UTC
  • Revision ID: root@ds3-vamp.cs-monitor.cz.cc-20100113074431-kt8ceoeznpjg22x7
Reviving the project

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * ServicesHostingServicesPage.class.php
 
4
 *
 
5
 * This file contains the definition for the ServicesHostingServicesPage class
 
6
 *
 
7
 * @package Pages
 
8
 * @author John Diamond <jdiamond@solid-state.org>
 
9
 * @copyright John Diamond <jdiamond@solid-state.org>
 
10
 * @license http://www.opensource.org/licenses/gpl-license.php GNU Public License
 
11
 */
 
12
 
 
13
// Include the parent class
 
14
require BASE_PATH . "include/SolidStatePage.class.php";
 
15
 
 
16
/**
 
17
 * ServicesHostingServicesPage
 
18
 *
 
19
 * Display all of the hosting services offered by the provider
 
20
 *
 
21
 * @package Pages
 
22
 * @author John Diamond <jdiamond@solid-state.org>
 
23
 */
 
24
class ServicesHostingServicesPage extends SolidStatePage
 
25
{
 
26
  /**
 
27
   * Action
 
28
   *
 
29
   * Actions handled by this page:
 
30
   *   web_hosting_action (form)
 
31
   *
 
32
   * @param string $action_name Action
 
33
   */
 
34
  public function action( $action_name )
 
35
  {
 
36
    switch( $action_name )
 
37
      {
 
38
      case "web_hosting_action":
 
39
        if( isset( $this->post['add'] ) )
 
40
          {
 
41
            // Goto new user page
 
42
            $this->goto( "services_new_hosting" );
 
43
          }
 
44
        break;
 
45
 
 
46
      case "search_hosting_services":
 
47
        $this->searchTable( "hosting_services", "hosting_services", $this->post );
 
48
        break;
 
49
 
 
50
      case "hosting_services":
 
51
        if( $this->post['remove'] )
 
52
          {
 
53
            $this->deleteService();
 
54
          }
 
55
        break;
 
56
 
 
57
      default:
 
58
        // No matching action, refer to base class
 
59
        parent::action( $action_name );
 
60
      }
 
61
  }
 
62
 
 
63
  /**
 
64
   * Delete Hosting Service
 
65
   */
 
66
  protected function deleteService()
 
67
  {
 
68
    foreach( $this->post['hosting_services'] as $serviceDBO )
 
69
      {
 
70
        delete_HostingServiceDBO( $serviceDBO );
 
71
      }
 
72
 
 
73
    $this->setMessage( array( "type" => "[HOSTING_SERVICES_DELETED]" ) );
 
74
    $this->reload();
 
75
  }
 
76
}
 
77
 
 
78
?>
 
 
b'\\ No newline at end of file'