Location: PHPKode > projects > PAS SiteManager > passitemanager/editproject.php
<?php 
// Copyright 2002 Philippe Lewicki           hide@address.com

  /*****
   * Edit or add an event
   */

  include("config.php") ;
  $pageTitle = $strEditProject ;
    $stateTree = "colapse" ;
  include("includes/header.inc.php");
  /*
  if (strlen($numnewevent)>0) {
    $numevent = $numnewevent ;
    session_register("numevent") ;
  }
  */
  ?>
  <div class="errormessage"><?php 
  echo stripslashes($message) ;
  ?></div>
  <?php 
    if (!isset($project_name) && ($config_squash != "yes")) {
      $project_name = $_SESSION['cfg_project_name'];
    }
  // primaryvalue is a variable in the query linked to the form 1
    $form = new ReportForm($mydbconx,"EditProject");
    $form->event = new Event("webide.manageProject", "save") ;
    $form->event->addParam("goto", "index.php") ;
    $form->reg = new registry($mydbconx, "project") ;

    $filename = $cfg_local_projects_dir.$project_name.".xml.prj" ;
    if (file_exists($filename)) {
    /*
      $project_filename =  $cfg_local_projects_dir.$project_name.".inc.prj" ;
        $projectser = implode("", @file($project_filename));
        $editedconx = unserialize($projectser);
        $form->event->addParam("last_project_name", $project_name) ;
        $form->values["projectname"]=$project_name ;
        $form->values["server"] = $editedconx->hostname;
        $form->values["database"] = $editedconx->db ;
        $form->values["login"] =  $editedconx->login ;
        $form->values["password"] = $editedconx->password ;
        $form->values["dbsync"] = $editedconx->backupSync ? "Yes" : "" ;
        $form->values["usedatabase"] = $editedconx->useDatabase  ? "Yes" : "" ;
        $form->values["dirmydb"] = $editedconx->getBaseDirectory() ;
        $form->values["dirproject"] = $editedconx->getProjectDirectory() ;
  */

        $form->values = $cfg_project_info ;


    } else {
        $form->event->addParam("newproject", "Yes") ;
    }
    $form->setHeader($form->event->getFormHeader()) ;
    $form->setHeader($form->event->getFormEvent()) ;
    $form->setFooter($form->event->getFormFooter("Submit")) ;

    $form->execute() ;

  include("includes/footer.inc.php") ;
?>
Return current item: PAS SiteManager