Source for file jOCSP_functions.phpinc

Documentation is available at jOCSP_functions.phpinc

  1. <?php
  2. /**
  3.   * Common Functions to interact with jOCSP javascript
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    jOCSP
  7.   *
  8.   * @author     Peter Krebs (pk) <pitlinz@users.sourceforge.net>
  9.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  10.   *
  11.   * @since pk-08-02-07
  12.   *
  13.   ***/
  14.  
  15. /**
  16.  * returns the js command to register an error
  17.  *
  18.  * @param string $str_msg 
  19.  * @param boolean $silient 
  20.  * @param string $str_debugInfo 
  21.  *
  22.  * @return string (js)
  23.  *   
  24.  */
  25. function jOCSP_registerError($str_msg,$silent=False,$str_debugInfo=NULL)
  26. {
  27.     $str_ret  ="jOCSP.addError({";
  28.     $str_ret .= "msg: '" pcf_js_escape($str_msg."'";
  29.     $str_ret .= ",debugInfo: '" pcf_js_escape($str_msg"'";
  30.     $str_ret .= ",reqURI: '" pcf_js_escape($_SERVER['REQUEST_URI']."'"
  31.     $str_ret .="});";
  32.     
  33.     if (!$silent)
  34.     {
  35.         $str_ret .= "alert('Fehler: " pcf_js_escape($str_msg."');";
  36.     }
  37.     
  38.     return $str_ret;
  39. }
  40.  
  41. /**
  42.  * returns the js code to open a form in a new layer
  43.  *
  44.  * @param string $str_OuterId 
  45.  * @param OCSP_FRM_VIEW $viewObj 
  46.  * @param int $frmMode 
  47.  * @param boolean $debug 
  48.  * 
  49.  * @return string (js)
  50.  * 
  51.  * @since pk-08-02-11
  52.  */
  53. function jOCSP_getFormLayer($str_OuterId,&$viewObj,$frmMode=FRM_MODE_EDIT,$debug=FALSE)
  54. {
  55.     global $OCSP_CONF;
  56.     
  57.     $str_ret "
  58.         jOCSP.requestScript('" $OCSP_CONF['SYSTEMURL'"jOCSP/jOCSP_dom.js',true);        
  59.         obj_shadowLayer = jOCSP.dom.shadowLayer('" $str_OuterId "',true);
  60.         if (obj_frmLayer = jOCSP.dom.formLayerCreate('" $str_OuterId "'))
  61.         {
  62.             obj_frmLayer.innerHTML = '" pcf_js_escape($viewObj->getForm($frmMode)) "';
  63.         } else {
  64.             jOCSP.dom.shadowLayerClear('" $str_OuterId "');
  65.         }                    
  66.         ";
  67.     return $str_ret;
  68. }
  69. ?>

Documentation generated on Thu, 08 Jan 2009 17:44:30 +0100 by phpDocumentor 1.4.0a2