コード例 #1
0
ファイル: usr.form.php プロジェクト: aliihaidar/pso
         $fileObj = null;
     }
     $in2Action = 'edit';
     $frmAction = 'edit';
     goToURL($actScript . "?recordId=" . $_REQUEST['us_id'] . "&in2Action=editRecord&frmAction=edit{$error}");
 case 'editRecord':
     if ($recordId) {
         $id = $recordId;
     } elseif ($us_id) {
         $id = $us_id;
     } else {
         $id = null;
     }
     if ($id) {
         $where = "WHERE us_id = " . $obj->getSqlColValue('us_id', $id);
         $record = $obj->SelectRecord(null, $where, MYSQL_ASSOC, false);
         if (is_array($record)) {
             globalizeArray($record);
         } else {
             $_SESSION['errorMsgs'] = array('erroneousParam' => 'Erroneous parameter passed.');
             $error = '&error=1';
             goToURL($actScript . $error);
         }
     } else {
         goToURL($actScript);
     }
     $buttons .= '<button type="submit" class="btn btn-block btn-success btn-circle" onclick="document.getElementById(\'in2Action\').value=\'edit\'"><i class="fa fa-check"></i>&nbsp;' . $arrLang[$_SESSION['lang']]['update'] . '</button>';
     $buttons .= '<button type="button" class="btn btn-block btn-danger btn-circle" onclick="jQuery(\'#btnReset\').click(); deleteFrmRecord()"><i class="fa fa-trash-o"></i>&nbsp;' . $arrLang[$_SESSION['lang']]['delete'] . '</button>';
     $buttons .= '<button type="button" class="btn btn-block btn-default btn-circle" onclick="window.location=\'' . $actScript . '\'"><i class="fa fa-plus"></i>&nbsp;' . $arrLang[$_SESSION['lang']]['addnew'] . '</button>';
     /**
      * If image/doc/video value exists; add View & Remove buttons