Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @file
- * This file contains the code to edit a §site.
- *
- * @cond $HeadURL: svn+ssh://dregal@svnthis-companynw/var/svn/this-company/admin/david/src/site_edit.php $ @endcond
- * $Id: site_edit.php 1965 2012-08-17 02:18:56Z dregal $
- *
- */
- require_once('include.inc');
- require_once('Site.class.inc');
- // debug
- $debug = false;
- $errors = $warnings = array();
- function top_level_handler($exception)
- {
- echo "<b>ERROR: Uncaught Exception occurred:</b> " . $exception->getMessage();
- }
- set_exception_handler('top_level_handler');
- //-----------------------------------------------------------------------------
- //
- // Functions
- //
- //-----------------------------------------------------------------------------
- //-----------------------------------------------------------------------------
- /**
- Show the edit form for a site item. Without additional programming,
- This form will not work to create new sites, but works to edit an
- existing one.
- */
- function edit_site_form( $id, $cgiFields, &$errors)
- {
- // Error count is returned and helps determine
- // whether or not to add an error message to the error array.
- $error_ct = 0;
- // 1 or not empty value = show fields. empty, null, false, etc = hide fields
- $bShowFieldsDB = @$cgiFields['show_fields_db'];
- // Site object
- $oSite = null;
- // Input fields are controlled depending on the delete option
- $bDelete = ( 'on' == @$cgiFields['delete'] );
- // Cast $id to integer
- $id = (int) $id;
- //
- // if we are editing the site item, then
- // load the necessary objects.
- //
- $oSite = new Site();
- // Load the object if an $id was given
- if ( 0 != $id )
- {
- $oSite->Get($id);
- }
- else
- {
- // new site
- }
- // Get a list of Abbreviations to show for resync options
- // Default is blank
- $ary_site_abbreviation = $oSite->GetArrayResyncDestinationsPossibilities();
- echo '<form action="site_edit.php" method="POST">';
- // Show the form if not a delete operation
- if ( $bDelete == false )
- {
- $oBranch = new Branch();
- $ary_branch_id = $oBranch->GetArrayBranches("", true);
- echo '
- <table>
- <tr>
- <td class="rhead">Abbreviations: </td>
- <td>
- ';
- if ( 0 != $id )
- {
- // Show table of abbreviations if the site has them.
- $siteAddressObjList = $oSite->GetSiteAddresses();
- // Show all the items we found
- //
- if ( $siteAddressObjList )
- {
- echo '<table>';
- $rt = 0;
- // print header
- echo '<tr class="chead">';
- echo '<td>Abbreviation</td>';
- echo '</tr>';
- foreach ( $siteAddressObjList as $oSiteAddress )
- {
- // Flip the bit in $rt toggle, so it alternates between zero and one.
- $rt ^= 1;
- echo '<tr class="row'. $rt .'">';
- echo '<td><a href="site_address_edit.php?id=' . $oSiteAddress->GetID() .
- '" title="Site Address ID: ' . $oSiteAddress->GetID() .
- ', Site ID: '. $oSiteAddress->GetSiteID() .
- '" target="_blank">' . $oSiteAddress->GetAddress() . '</a></td>';
- echo '<td>', html_checkbox("deleted_site_address_" . $oSiteAddress->GetID(), 0, ' Delete'), ' </td>';
- // end of the row
- echo '</tr>';
- }
- echo '</table>';
- // Drop-down select for Default Site Address
- echo '<tr>
- <td class="rhead">Default Abbreviation: </td>
- <td>
- ', html_select_array( "default_site_address_id", $oSite->GetArraySiteAddress(), $oSite->GetDefaultSiteAddressID(), 0, "id=\"default_site_address_id\""), '
- </td>
- </tr>
- ';
- }
- else
- {
- echo '<i>none</i>';
- }
- }
- echo '
- </td>
- </tr>
- <tr>
- <td class="rhead">Add Abbreviation: </td>
- <td>
- <input name="site_address" id="site_address" type="text" size="32" maxlength="32" value="" />
- <br /><i>(Only supports one new abbreviation at a time.)</i>
- </td>
- </tr>
- ';
- echo '
- <tr>
- <td class="rhead">Site Name: </td>
- <td>
- <input name="site_name" id="site_name" type="text" size="32" maxlength="255" value="', $oSite->GetName() ,'" />
- <br /><i>(Do not use abbreviations. This is how the site will appear on the index page.).</i>
- </td>
- </tr>
- <tr>
- <td class="rhead">Site School District: </td>
- <td>
- <input name="site_district" id="site_district" type="text" size="32" maxlength="255" value="', $oSite->site_district , '" />
- <br /><i>(This is how the district will appear on the index page.).</i>
- </td>
- </tr>
- ';
- if ( 0 != $id )
- {
- echo '
- <tr>
- <td class="rhead">Database Fields: </td>
- <td>
- ';
- if ( $bShowFieldsDB )
- {
- echo '
- <table>
- <input name="submitted_fields_db" id="submitted_fields_db" type="hidden" value="1" />
- <tr>
- <td>DB User: </td>
- <td>
- <input name="db_user" id="db_user" type="text" size="64" maxlength="64" value="', $oSite->db_user ,'" />
- </td>
- </tr>
- <tr>
- <td>DB Password: </td>
- <td>
- <input name="db_pass" id="db_pass" type="text" size="64" maxlength="64" value="', $oSite->db_pass ,'" />
- </td>
- </tr>
- <tr>
- <td>DB Host: </td>
- <td>
- <input name="db_host" id="db_host" type="text" size="64" maxlength="64" value="', $oSite->db_host ,'" />
- </td>
- </tr>
- <tr>
- <td>DB Name: </td>
- <td>
- <input name="db_name" id="db_name" type="text" size="64" maxlength="64" value="', $oSite->db_name ,'" />
- </td>
- </tr>
- </table>
- ';
- }
- echo
- html_checkbox("show_fields_db", $bShowFieldsDB, "Show Database fields", 1, "id=\"show_fields_db\"") . '
- </td>
- </tr>
- <tr>
- <td class="rhead">User Banner: </td>
- <td>
- <textarea name="user_banner" id="user_banner" cols="60" rows="5">', $oSite->GetUserBanner() ,'</textarea>
- <br /><i>(This banner is shown on all pages of a site, or shown as the reason for it being offline. User customizable.).</i>
- </td>
- </tr>
- <tr>
- <td class="rhead">Admin Banner: </td>
- <td>
- <textarea name="admin_banner" id="admin_banner" cols="60" rows="5">', $oSite->GetAdminBanner() ,'</textarea>
- <br /><i>(This banner is shown on all pages of a site, or shown as the reason for it being offline. System admins.).</i>
- </td>
- </tr>
- <tr>
- <td class="rhead">Site Lockout (Site Flags): </td>
- <td>
- ' . html_checkbox("site_flags_user", $oSite->GetSiteFlagsUser() ,"Site offline due to user request", 1, "id=\"site_flags_user\"") . '<br />
- ' . html_checkbox("site_flags_admin", $oSite->GetSiteFlagsAdmin() ,"Site offline for administrative reasons", 1, "id=\"site_flags_admin\"") . '<br />
- Site Flags: ' . $oSite->GetSiteFlags() . '<br />
- </td>
- </tr>
- <tr>
- <td class="rhead">Site SQL: </td>
- <td>
- ' . html_checkbox("site_sql", $oSite->GetSiteSQL(), "Allow unprotected accounts to perform SQL queries", 1, "id=\"site_sql\"") . '
- </td>
- </tr>
- <tr>
- <td class="rhead">Debugging Features (Site Debug): </td>
- <td>
- ' . html_checkbox("site_debug", $oSite->GetSiteDebug(), "Enable basic debugging capabilities", 1, "id=\"site_debug\"") . '
- </td>
- </tr>
- ';
- }
- echo '
- <tr>
- <td class="rhead">Site Display: </td>
- <td>
- ' . html_checkbox("site_display", $oSite->GetSiteDisplay(), "Show on homepage", 1, "id=\"site_display\"") . '
- </td>
- </tr>
- <tr>
- <td class="rhead">Site Type: </td>
- <td>', html_select_array('site_type', Site::$enum_site_type, $oSite->GetSiteType(), 0, "id=\"site_type\" onchange=\"selected_site_type()\""), '</td>
- </tr>
- <tr>
- <td class="rhead">Site Expires: </td>
- <td>
- ', Date::writeDateWidget('site_expires', $oSite->GetSiteExpiresEpoch() ), '
- <br /><i>(Leave blank for a site that does not expire. The site will become unavailable to regular users after this date.)</i>
- <br />', html_checkbox('site_expires_lockout', @$_REQUEST['site_expires_lockout'], ' Forbid admin logins after site expiration', 1, "id=\"site_expires_lockout\""), '
- <br /><i>(Normally people with administrator accounts can still log in to an expired site. Check this option to disable this behavior. Protected accounts will still be able to log in.)</i>
- </td>
- </tr>
- <tr>
- <td class="rhead">Code Branch: </td>
- <td>
- ', html_select_array( "branch_id", $ary_branch_id, $oSite->GetBranchID(), 0, "id=\"branch_id\""), '
- </td>
- </tr>
- <tr>
- <td class="rhead">Resync: </td>
- <td>', html_checkbox("resync_enabled", $oSite->GetResyncOriginSiteAddressID() != null ? "checked" : "",
- "Resync enabled.", 1, "id=\"resync_enabled\""), ' Origin: ', html_select_array( 'resync_origin', $ary_site_abbreviation, $oSite->GetResyncOriginSiteAddressID(), 0, "id=\"resync_origin\" onchange=\"edit_resync_origin()\"" ) , '
- <br /><i>(Allows the content of this site to be periodically refreshed from the site it is a copy of. <b>Do not enable on Paid or Archived/Historical sites.</b>)</i>
- <br />Resync Interval: <input type="text" id="resync_interval" name="resync_interval" maxlength="8" size="8" value="', $oSite->GetSiteResyncInterval() , '" /> seconds
- <br /><i>(How long to wait between automatic resyncs. Leave blank to only allow manual resyncs.)</i>
- ';
- if ( 0 != $id )
- {
- echo '
- <br />', html_checkbox("resync_now", "", "Resync now.", 1, "id=\"resync_now\""), '
- ';
- }
- echo '
- </td>
- </tr>
- ';
- if ( 0 != $id ){
- echo '
- <tr>
- <td class="rhead">ID: </td>
- <td>' . $id . '</td>
- </tr>
- ';
- }
- echo '
- </table>
- ';
- }
- // include the id field, delete, and copy options if this item already exists.
- if ( 0 != $id )
- {
- echo '<input type="hidden" value="' . $id . '" name="id" />';
- if ( $bDelete == false )
- {
- // Give the use the option to delete. Delete checkbox.
- echo '<input type="checkbox" name="delete" id="delete" onclick="edit_delete( this.checked)" />Delete?<br />';
- // Copy (clone) checkbox
- echo '<input type="checkbox" name="copy" id="copy" onclick="edit_copy( this.checked)" />Copy?<br />';
- echo '<br /><br /><input type="submit" name="action" value="Save Changes" />';
- }
- else
- {
- echo "Site Name: ". $oSite->GetName() ."<br/>";
- // Delete operation
- // List sites using this site. <br/> If used, give user options, such as reassigning dependent records to a different parent. <br /></i>';
- // Get a list of Sites that use this Site as a Resync Origin
- try
- {
- if( $oSite->HasResyncDestination() )
- {
- echo '<h2>Resync Destinations</h2>';
- $aResyncDestinations = $oSite->GetResyncDestinationNames();
- echo '<table>';
- $rt = 0;
- // print header
- echo '<tr class="chead">';
- echo '<td>Site is used as a Resync Origin by: </td>';
- echo '</tr>';
- foreach( $aResyncDestinations as $destination )
- {
- // Flip the bit in $rt toggle, so it alternates between zero and one.
- $rt ^= 1;
- echo '<tr class="row'. $rt .'">';
- echo "<td>$destination</td>";
- //
- // end of the row
- echo '</tr>';
- }
- echo '</table>';
- echo "<br />";
- echo "Reassign resync destinations to: " . html_select_array( 'resync_origin', $oSite->GetResyncDestinationsPossibilities(), "", 0, "id=\"resync_origin\"" );
- echo "<br />";
- echo "<br />";
- }
- if ( $oSite->GetConfirmDeleteWarn() )
- {
- // Give a warning.
- echo '<b> WARNING: You are about to delete a '. $oSite->GetSiteTypePretty() .' site. Proceed with caution.</b><br />';
- }
- if ( $oSite->GetConfirmDeleteWithSiteAddress() )
- {
- echo '<h2>Confirm with an Abbreviation</h2>';
- echo 'Enter one abbreviation used by this site: <input name="delete_confirm_site_address" type="text" size="32" maxlength="32" value=""/>';
- echo "<br />";
- echo "<br />";
- // Show table of abbreviations.
- $siteAddressObjList = $oSite->GetSiteAddresses();
- // Show all the items we found
- if ( $siteAddressObjList )
- {
- echo '<table>';
- $rt = 0;
- // print header
- echo '<tr class="chead">';
- echo '<td>Abbreviation</td>';
- echo '</tr>';
- foreach ( $siteAddressObjList as $oSiteAddress )
- {
- // Flip the bit in $rt toggle, so it alternates between zero and one.
- $rt ^= 1;
- echo '<tr class="row'. $rt .'">';
- echo '<td>' . $oSiteAddress->GetAddress() . '</td>';
- // end of the row
- echo '</tr>';
- }
- echo '</table>';
- }
- }
- }
- catch( Exception $ex )
- {
- $errors[] = "At line: " . __LINE__ . ". Failed " . $ex->getMessage();
- $error_ct++;
- }
- // Confirm deletion
- echo '<br /><br /><input type="submit" name="action" value="Delete" />';
- // Cancel deletion
- echo ' <input type="submit" name="action" value="Cancel" />';
- }
- }
- echo '</form>';
- return $error_ct;
- }
- // Description: Saves the changes or creates a new site. Modifies the $id variable.
- //-----------------------------------------------------------------------------
- function save_site( &$id, &$cgiFields, &$errors, &$warnings )
- {
- // Check if this is a copy action
- $bCopy = ( 'on' == @$cgiFields['copy'] );
- // 1 or not empty value = show fields. empty, null, false, etc = hide fields
- $bSubmittedFieldsDB = @$cgiFields['submitted_fields_db'];
- // Cast $id to integer
- $id = (int) $id;
- // load the (source) site object.
- if ( 0 != $id && $id != 0)
- {
- $oSite = new Site();
- $oSite->Get($id);
- }
- else if ( $bCopy )
- {
- $errors[] = "Cannot copy before creation.";
- }
- else
- {
- $oSite = new Site();
- }
- if ( !$errors )
- {
- // Save or copy the changes to the object
- $oSite->SetName( $cgiFields['site_name'] );
- if ( ! empty( $cgiFields['default_site_address_id'] ) )
- {
- try
- {
- $oSite->SetDefaultSiteAddressID( @$cgiFields['default_site_address_id'] );
- }
- catch( Exception $ex)
- {
- $errors[] = "Caught exception in File: " . __FILE__ .
- ", Line: " . __LINE__ . ".<br /> Message: " . $ex->getMessage();
- }
- }
- $oSite->SetSiteDistrict($cgiFields['site_district']);
- $oSite->SetUserBanner($cgiFields['user_banner']);
- $oSite->SetAdminBanner($cgiFields['admin_banner']);
- $oSite->SetSiteType($cgiFields['site_type']);
- $oSite->SetSiteFlagsUser(@$cgiFields['site_flags_user']);
- $oSite->SetSiteFlagsAdmin(@$cgiFields['site_flags_admin']);
- if ($bSubmittedFieldsDB)
- {
- $oSite->SetDBUser(@$cgiFields['db_user']);
- $oSite->SetDBPass(@$cgiFields['db_pass']);
- $oSite->SetDBHost(@$cgiFields['db_host']);
- $oSite->SetDBName(@$cgiFields['db_name']);
- }
- $oSite->SetSiteSQL(@$cgiFields['site_sql']);
- $oSite->SetSiteDebug(@$cgiFields['site_debug']);
- $oSite->SetSiteDisplay(@$cgiFields['site_display']);
- try
- {
- $site_expires = Date::readDateWidget("site_expires");
- }
- catch (EmptyDateException $ex)
- {
- $site_expires = null;
- }
- catch (InvalidDateException $ex)
- {
- $errors[] = "Site Expires: " . HSC($ex->getMessage());
- }
- $oSite->SetSiteExpires($site_expires);
- $oSite->SetSiteExpiresLockout(@$cgiFields['site_expires_lockout']);
- $oSite->SetBranchID( $cgiFields['branch_id'] );
- // Disable resync if we didn't ask to leave it on.
- if (empty($cgiFields['resync_enabled']))
- {
- // @todo: Ask Daniel if OK to remove the 'Resync Enabled' checkbox and instead use the selection of an origin as indicator Resync is enabled.
- // @todo: Check dependency between Resync Origin being blanked causing Resync Enabled to be blank.
- // @todo: Resync Origin blank != Resync Enabled blank.
- $oSite->SetResyncOrigin(null);
- }
- else
- {
- try
- {
- $oSite->SetResyncOrigin(@$cgiFields['resync_origin']);
- }
- catch( Exception $ex )
- {
- $errors[] = $ex->getMessage();
- }
- }
- if ( !empty($_REQUEST['resync_now']) )
- {
- try
- {
- $oSite->Resync();
- }
- catch( Exception $ex )
- {
- $errors[] = $ex->getMessage();
- }
- }
- try
- {
- // @todo: Warn if Resync enabled is checked but no resync origin was selected.
- $oSite->SetResyncInterval(@$cgiFields['resync_interval']);
- }
- catch( Exception $ex )
- {
- $errors[] = $ex->getMessage();
- }
- if ( !$errors )
- {
- // Copy the changes to the object to a new object
- if ( $bCopy === true )
- {
- try {
- // create copy and get the id of the newly created site
- $idCopy = $oSite->SaveNew();
- }
- catch( Exception $ex) {
- $errors[] = "Caught exception in File: " . __FILE__ .
- ", Line: " . __LINE__ . ".<br /> Message: " . $ex->getMessage();
- }
- }
- else
- {
- // Save the changes
- try
- {
- $oSite->Save();
- }
- catch( Exception $ex)
- {
- $errors[] = "Caught exception in File: " . __FILE__ .
- ", Line: " . __LINE__ . ".<br /> Message: " . $ex->getMessage();
- }
- }
- // Create a new Abbreviation (aka site address)
- if ( !empty($cgiFields['site_address']) ){
- try
- {
- $oSite->CreateSiteAddress( $cgiFields['site_address'] );
- }
- catch( Exception $e)
- {
- $errors[] = "Caught exception in File: " . __FILE__ .
- ", Line: " . __LINE__ . ".<br/> Message: " . $e->getMessage();
- }
- if ( !$errors )
- {
- $oSite->Save();
- }
- }
- // Delete site address if marked for deletion
- // Show table of abbreviations if the site has them.
- $siteAddressObjList = $oSite->GetSiteAddresses();
- // Go through all the items we found
- if ( $siteAddressObjList ){
- foreach ( $siteAddressObjList as $oSiteAddress )
- {
- if( !empty($cgiFields["deleted_site_address_" . $oSiteAddress->GetID()]) )
- {
- $warnings[] = "Deleted Abbreviation: " . $oSiteAddress->GetAddress() . ", Abbr ID: " . $oSiteAddress->GetID();
- // Delete the site address
- if ( $oSiteAddress->Delete() === false )
- {
- $errors[] = "Error occurred when attempting to delete Abbreviation "
- . $oSiteAddress->GetAddress() ;
- $error_ct++;
- }
- else
- {
- // Site Address deleted successfully
- // Clear the object from memory
- unset( $oSiteAddress );
- }
- }
- }
- }
- }
- }
- // Check for warnings
- if ( !$errors )
- {
- $aSiteWarnings = $oSite->GetWarnings();
- foreach ( $aSiteWarnings as $warning )
- {
- $warnings[] = "<b>" . $warning . "</b><br/>";
- }
- }
- if ( $errors )
- {
- return false;
- }
- else
- {
- if ( $bCopy )
- {
- html_msg_success("Site copied successfully. Id of copy: $idCopy");
- }
- else
- {
- html_msg_success("Site saved successfully.");
- }
- $id = $oSite->GetID();
- return true;
- }
- }
- //-----------------------------------------------------------------------------
- function delete_site( $id, $cgiFields, &$errors)
- {
- $error_ct = 0;
- // Cast $id to integer
- $id = (int) $id;
- // load the site object.
- if ( 0 != $id )
- {
- $oSite = new Site();
- $oSite->Get($id);
- }
- else
- {
- $errors[] = "Invalid options given. Check values of ID: $id.";
- $error_ct++;
- }
- if ( "Delete" === @$cgiFields['action'] && 0 === $error_ct )
- {
- $bDeleteConfirm = true;
- // If applicable, check for Abbreviation here.
- if ( $error_ct === 0 ){
- //Confirm delete
- if ( $oSite->GetConfirmDeleteWithSiteAddress() )
- {
- if ( !empty( $cgiFields['delete_confirm_site_address'] ) && $oSite->GetSiteAddress( $cgiFields['delete_confirm_site_address'] ) )
- {
- // Confirm the delete with an Abbreviation passed. Continue the delete action.
- }
- else
- {
- // Stop the delete action.
- $bDeleteConfirm = false;
- $errors[] = "Could not delete Site. Abbreviation not found: '". $cgiFields['delete_confirm_site_address'] ."' for site " . $oSite->GetName() ;
- $error_ct++;
- }
- }
- }
- }
- else
- {
- $bDeleteConfirm = false;
- $errors[] = "Delete action not set.";
- $error_ct++;
- }
- if ( $error_ct === 0 ){
- // Delete the object
- if ( $bDeleteConfirm === true )
- {
- try {
- // Check if new resync origin was selected
- if ( !empty($cgiFields['resync_origin']) )
- {
- $aResyncDestinations = $oSite->GetResyncDestinations();
- foreach( $aResyncDestinations as $oSiteResyncDestination )
- {
- $oSiteResyncDestination->SetResyncOrigin( $cgiFields['resync_origin'] );
- $oSiteResyncDestination->Save();
- }
- }
- }
- catch ( Exception $e)
- {
- throw new Exception("Could not resync destinations to use a new resync origin. Caught exception in File: " . __FILE__ . ", Line: "
- . __LINE__ . ".<br/> Message: " . $e->getMessage() );
- }
- try {
- if ( $oSite->Delete() === false )
- {
- $errors[] = "Error occurred when attempting to delete Site "
- . $oSite->GetName() ;
- $error_ct++;
- }
- else
- {
- // Site deleted successfully
- // Clear the object from memory
- unset( $oSite );
- }
- }
- catch ( Exception $e)
- {
- throw new Exception("Could not delete site. Caught exception in File: " . __FILE__ . ", Line: "
- . __LINE__ . ".<br/> Message: " . $e->getMessage() );
- }
- }
- }
- return $error_ct;
- }
- //-----------------------------------------------------------------------------
- //
- // Initialization
- //
- //-----------------------------------------------------------------------------
- // Get the ID
- $id = null;
- if ( 0 < strlen( @$_REQUEST['id'] ) && 0 != (int) $_REQUEST['id'] )
- {
- $id = (int) $_REQUEST['id'];
- }
- // Get the delete option
- $bDelete = ( 'on' == @$_REQUEST['delete'] );
- // Page title
- if ( $id && !$bDelete )
- {
- html_page_start("Edit Site");
- }
- else if ( $id && $bDelete )
- {
- html_page_start("Confirm Delete Site");
- }
- else
- {
- html_page_start("Create Site");
- }
- echo '<script type="text/javascript" src="site.js"></script>';
- if ( $id )
- {
- if ( $debug )
- {
- echo "<p><i>Debug: Currently editing Site ID $id</i><p/>";
- }
- }
- //-----------------------------------------------------------------------------
- //
- // if there is an 'action' field, then check if the Save Changes button was clicked.
- //
- //-----------------------------------------------------------------------------
- if ( 'Save Changes' == @$_REQUEST['action'] )
- {
- // Saves or copies the site if not a delete
- if ( !$bDelete )
- {
- if ( save_site( $id, $_REQUEST, $errors, $warnings ) === false )
- {
- $errors[] = "Save failed.";
- }
- }
- }
- else if ( 'Delete' == @$_REQUEST['action'] )
- {
- // Delete confirmed
- if ( delete_site( $id, $_REQUEST, $errors) != 0 )
- {
- $errors[] = "Could not delete the site.";
- }
- else
- {
- html_msg_success("Site deleted successfully.");
- $id = null;
- }
- }
- // else if ( 'Cancel' == @$_REQUEST['action'] ) // Do nothing
- if ($errors) html_msg_errors($errors);
- if ($warnings) html_msg_warnings($warnings);
- //----------------------------------------------------------------------------
- //
- // show the edit form.
- //
- //----------------------------------------------------------------------------
- if ( edit_site_form( $id, $_REQUEST, $errors) != 0 )
- {
- html_msg_errors($errors);
- }
- if ($debug) {
- error_reporting(E_ALL);
- }
- //
- // EOF
- ?>
Add Comment
Please, Sign In to add comment