PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/web/ca/self/site.php

http://webgloo.googlecode.com/
PHP | 172 lines | 111 code | 59 blank | 2 comment | 2 complexity | 21ee7ab393e6d2e10f4de875c7a2aff2 MD5 | raw file
  1. <?php
  2. include 'gloo.inc' ;
  3. require_once ($_SERVER['GLOO_INC_DIR'].'class_loader.inc' );
  4. require_once ($_SERVER['GLOO_INC_DIR'].'session.inc' );
  5. require_once ($_SERVER['GLOO_INC_DIR'].'error.inc' );
  6. include($location->GLOO_PAGE_HEADER);
  7. $glooWeb = Gloo_Core_Web::getInstance();
  8. //ca/self/site.php
  9. $userParam = NULL ;
  10. if(array_key_exists('USER',$_GET)) {
  11. $userParam = $_GET['USER'];
  12. } else {
  13. trigger_error('Username not found in request',E_USER_ERROR);
  14. exit ;
  15. }
  16. $glooConfig = Gloo_Config::getInstance();
  17. ?>
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  19. <html><head><title> <?php echo $glooConfig->getFarmBuilderName(); ?> </title>
  20. <?php
  21. include($location->GLOO_META_TAGS);
  22. echo $glooWeb->loadCss(url::YUI_GRID_CSS) ;
  23. //give me default theme
  24. echo $glooWeb->loadCss(url::css('main.css'));
  25. echo $glooWeb->loadCss('/art/minimal/admin.css');
  26. echo $glooWeb->loadJS(url::JQUERY_MAIN_JS);
  27. echo $glooWeb->loadJS(url::JQUERY_VALIDATE_JS);
  28. ?>
  29. <script type="text/javascript">
  30. $(document).ready(function(){
  31. $("#ca_self_form").validate({
  32. errorLabelContainer: $("#ca_self_form div.error")
  33. });
  34. });
  35. </script>
  36. </head>
  37. <body>
  38. <div id="top-toolbar"> </div>
  39. <div id="custom-doc" class="yui-t1">
  40. <div id="hd" role="banner">
  41. <div id="header">
  42. <a href="<?php echo $glooConfig->getFarmURI(); ?>"><img src="<?php echo $glooConfig->getFarmLogoPath(); ?>" alt="logo" /> </a>
  43. <div id="description">
  44. <a href="<?php echo $glooConfig->getFarmURI(); ?>"> Back to <?php echo $glooConfig->getFarmName(); ?></a>
  45. &nbsp;&gt;&nbsp;
  46. Create Website - Step 2
  47. </div>
  48. </div> <!-- header -->
  49. </div>
  50. <div id="bd" role="main">
  51. <div id="yui-main">
  52. <div class="yui-b">
  53. <div class="yui-g">
  54. <div id="content">
  55. <h2> Website name and contact email</h2>
  56. <?php
  57. $sticky = $glooWeb->getStickyMap('ca_self_form');
  58. $glooPageSection = 'ca_self_form';
  59. include ($_SERVER['GLOO_INC_DIR'].'script_message.inc');
  60. ?>
  61. <p class="help-text">
  62. Please select your website name and a contact email. One example of name
  63. is "Acme small business". Your email will be your used id.
  64. </p>
  65. <div class="box_top_bg">
  66. <div> <div> </div> </div>
  67. </div>
  68. <div id="form">
  69. <form id="ca_self_form" class="sform" action="/ca/self/frm/site.php" method="POST">
  70. <div class="error"> </div>
  71. <table cellspacing="5" class="formGroup">
  72. <tr>
  73. <td class="field"> Website name<span class="red-label">*</span>&nbsp;</td>
  74. <td> <input type="text" maxlength="100" name="title" class="required" title="Name is required" value="<?php echo $sticky->get('title'); ?>" /></td>
  75. </tr>
  76. <tr>
  77. <td class="field">Email<span class="red-label">*</span>&nbsp; </td>
  78. <td> <input type="text" name="email" maxlength="64" class="required email" title="Valid email is required" value="<?php echo $sticky->get('email'); ?>" /></td>
  79. </tr>
  80. <tr>
  81. <td>&nbsp;</td>
  82. <td id="bottomBar">
  83. <div class="submit">
  84. <div>
  85. <button type="submit" name="save" value="Save" onclick="this.setAttribute('value','Save');" ><span>Save</span></button>
  86. </div>
  87. </div>
  88. </td>
  89. </tr>
  90. </table>
  91. <input type="hidden" name="user" value="<?php echo $userParam; ?>" />
  92. </form>
  93. </div> <!-- form -->
  94. <div class="box_bottom_bg">
  95. <div> <div> </div> </div>
  96. </div>
  97. <p>
  98. Need help? Please contact
  99. <a HREF="mailto:<?php echo $glooConfig->getFarmAdminEmail(); ?>"> <?php echo $glooConfig->getFarmAdminEmail(); ?> </a>
  100. </p>
  101. </div> <!-- content -->
  102. </div>
  103. </div> <!-- block1 -->
  104. </div> <!-- yui-main -->
  105. <div class="yui-b">
  106. <div id="menu">
  107. </div>
  108. </div> <!-- block2 -->
  109. </div> <!-- bd -->
  110. </div> <!-- custom-doc -->
  111. <div id="ft" role="contentinfo"> <?php include($location->GLOO_PAGE_FOOTER); ?> </div>
  112. </body>
  113. </html>