buffer = array() ; $this->obj = $obj ; } /** ==================================================================================================================================================== * Add title in the form * * @param string $title the title to add * @return void */ function add_title($title) { $this->buffer[] = array('title', $title) ; } /** ==================================================================================================================================================== * Add title macroblock (i.e. that can be duplicate a plurality of time if the user needs it) in the form * * @param string $title the title to add * @return void */ function add_title_macroblock($title, $lien="") { if ($lien=="") { $lien = __("Add new", "SL_framework") ; } $this->buffer[] = array('title_macro', $title, $lien) ; } /** ==================================================================================================================================================== * Add a comment in the form * * @param string $comment the comment to add * @return void */ function add_comment($comment) { $this->buffer[] = array('comment', $comment) ; } /** ==================================================================================================================================================== * Add a comment in the form which display the default value of the param * * @param string $comment the comment to add * @return void */ function add_comment_default_value($param) { $comment = $this->obj->get_default_option($param) ; $comment = str_replace("\r", "", $comment) ; $comment = str_replace("<", "<", $comment) ; $comment = str_replace(">", ">", $comment) ; if (strpos($comment, "*")===0) $comment = substr($comment, 1) ; $comment = str_replace(" ", " ", $comment) ; $comment = str_replace("\n", "
", $comment) ; $this->buffer[] = array('comment', "$comment") ; } /** ==================================================================================================================================================== * Add a textarea, input, checkbox, etc. in the form to enable the modification of parameter of the plugin * * Please note that the default value of the parameter (defined in the get_default_option function) will define the type of input form. If the default value is a:
      - string, the input form will be an input text
      - integer, the input form will be an input text accepting only integer
      - string beggining with a '*', the input form will be a textarea
      - string equals to '[file]$path', the input form will be a file input and the file will be stored at $path (relative to the upload folder)
      - string equals to '[password]$password', the input form will be a password input ;
      - string equals to '[page]$page', the input form will be a dropdown list with a list of the pages ;
      - string equals to '[media]$media', the input form will be a element in the media library ;
      - array of string, the input form will be a dropdown list
      - boolean, the input form will be a checkbox * * @param string $param the name of the parameter/option as defined in your plugin and especially in the get_default_option of your plugin * @param string $name the displayed name of the parameter in the form * @param string $forbid regexp which will delete some characters in the submitted string (only a warning is raised) : For instance $forbid = "/[^a-zA-Z0-9]/" will remove all the non alphanumeric value * @param string $allow regexp which will verify that the submitted string will respect this rexexp, if not, the submitted value is not saved and an erreor is raised : For instance, $allow = "/^[a-zA-Z]/" require that the submitted string begin with a nalpha character * @param array $related a list of the other params that will be actived/deactivated when this parameter is set to true/false (thus, this param should be a boolean) * @return void */ function add_param($param, $name, $forbid="", $allow="", $related=array()) { $this->buffer[] = array('param', $param, $name, $forbid, $allow, $related) ; } /** ==================================================================================================================================================== * Get the new value of the parameter after its update (with happen upon calling flush) * * @param string $param the name of the parameter/option as defined in your plugin and especially in the get_default_option of your plugin * @return mixed the value of the param (array if there is an error or null if there is no new value) */ function get_new_value($param) { global $_POST ; global $_FILES ; // We reset the value to default //--------------------------------------- if (isset($_POST['resetOptions'])) { $value = $this->obj->get_default_option($param) ; if ((is_string($value))&&(strpos($value, "*")===0)) $value = substr($value, 1) ; return $value ; } // We find the correspondance in the array to find the allow and forbid tag //--------------------------------------- $name = "" ; $forbid = "" ; $allow = "" ; $related = "" ; for($iii=0; $iiibuffer); $iii++) { $ligne = $this->buffer[$iii] ; if ($ligne[0]=="param") { if ($param == $ligne[1]) { $name = $ligne[2] ; $forbid = $ligne[3] ; $allow = $ligne[4] ; $related = $ligne[5] ; break; } } } // What is the type of the parameter ? //--------------------------------------- $type = "string" ; if (is_bool($this->obj->get_default_option($param))) $type = "boolean" ; if (is_int($this->obj->get_default_option($param))) $type = "int" ; if (is_array($this->obj->get_default_option($param))) $type = "list" ; // C'est un text si dans le texte par defaut, il y a une etoile if (is_string($this->obj->get_default_option($param))) { if (strpos($this->obj->get_default_option($param), "*") === 0) $type = "text" ; } // C'est un file si dans le texte par defaut est egal a [file] if (is_string($this->obj->get_default_option($param))) { if (str_replace("[file]","",$this->obj->get_default_option($param)) != $this->obj->get_default_option($param)) $type = "file" ; } // C'est un password si dans le texte par defaut est egal a [password] if (is_string($this->obj->get_default_option($param))) { if (str_replace("[password]","",$this->obj->get_default_option($param)) != $this->obj->get_default_option($param)) $type = "password" ; } // C'est un media si dans le texte par defaut est egal a [media] if (is_string($this->obj->get_default_option($param))) { if (str_replace("[media]","",$this->obj->get_default_option($param)) != $this->obj->get_default_option($param)) $type = "media" ; } // C'est un media si dans le texte par defaut est egal a [media] if (is_string($this->obj->get_default_option($param))) { if (str_replace("[page]","",$this->obj->get_default_option($param)) != $this->obj->get_default_option($param)) $type = "page" ; } // We format the param //--------------------------------------- $problem_e = "" ; $problem_w = "" ; if (isset($_POST['submitOptions'])) { // Is it a boolean ? if ($type=="boolean") { if (isset($_POST[$param])) { if ($_POST[$param]) { return true ; } else { return false ; } } else { if (isset($_POST[$param."_workaround"])) { return false ; } else { return $this->obj->get_default_option($param) ; } } } // Is it an integer ? if ($type=="int") { if (isset($_POST[$param])) { if (SLFramework_Utils::is_really_int($_POST[$param])) { return (int)$_POST[$param] ; } else { if ($_POST[$param]=="") { return 0 ; } else { return array("error", "

".__('Error: the submitted value is not an integer and thus, the parameter has not been updated!', 'SL_framework')."

\n") ; } } } else { return $this->obj->get_default_option($param) ; } } // Is it a string ? if (($type=="string")||($type=="text")||($type=="password")) { if (isset($_POST[$param])) { $tmp = $_POST[$param] ; if ($forbid!="") { $tmp = preg_replace($forbid, '', $_POST[$param]) ; } if (($allow!="")&&(!preg_match($allow, $_POST[$param]))) { return array("error","

".__('Error: the submitted string does not match the constrains', 'SL_framework')." (".$allow.")!

\n") ; } else { return stripslashes($tmp) ; } } else { if ($type=="text") { if (substr($this->obj->get_default_option($param), 0,1)) { return substr($this->obj->get_default_option($param), 1) ; } } return $this->obj->get_default_option($param) ; } } // Is it a list ? if ($type=="list") { if (isset($_POST[$param])) { $selected = $_POST[$param] ; $array = $this->obj->get_param($param) ; $mod = false ; for ($i=0 ; $iobj->get_default_option($param) ; } } // is it a media if ($type=="media") { if (isset($_POST[$param])) { return $_POST[$param] ; } else { return str_replace("[media]","", $this->obj->get_default_option($param)) ; } } // is it a page if ($type=="page") { if (isset($_POST[$param])) { return $_POST[$param] ; } else { return str_replace("[page]","", $this->obj->get_default_option($param)) ; } } // Is it a file ? if ($type=="file") { // deleted ? $upload_dir = wp_upload_dir(); if (isset($_POST["delete_".$param])) { $deleted = $_POST["delete_".$param] ; if ($deleted=="1") { if (file_exists($upload_dir["basedir"].$this->obj->get_param($param))){ @unlink($upload_dir["basedir"].$this->obj->get_param($param)) ; } return $this->obj->get_default_option($param) ; } } if (isset($_FILES[$param])) { $tmp = $_FILES[$param]['tmp_name'] ; if ($tmp != "") { if ($_FILES[$param]["error"] > 0) { return array("error", "

".__('Error: the submitted file can not be uploaded!', 'SL_framework')."

\n") ; } else { $upload_dir = wp_upload_dir(); $path = $upload_dir["basedir"].str_replace("[file]","", $this->obj->get_default_option($param)) ; if (is_uploaded_file($_FILES[$param]['tmp_name'])) { if (!is_dir($path)) { @mkdir($path, 0777, true) ; } if (file_exists($path . $_FILES[$param]["name"])) { @unlink($path . $_FILES[$param]["name"]) ; } move_uploaded_file($_FILES[$param]["tmp_name"], $path . $_FILES[$param]["name"]); return str_replace("[file]","", $this->obj->get_default_option($param). $_FILES[$param]["name"]) ; } else if (is_file($path . $_FILES[$param]["name"])) { return str_replace("[file]","", $this->obj->get_default_option($param). $_FILES[$param]["name"]) ; } else { return array("error", "

".__('Error: security issue!'.$path . $_FILES[$param]["name"], 'SL_framework')."

\n") ; } } } else { return $this->obj->get_param($param) ; } } else { return $this->obj->get_param($param) ; } } } return null ; } /** ==================================================================================================================================================== * Remove a parameter of the plugin which has been previously added through add_param (then it can be useful if you want to update a parameter without printing the form) * * It will also remove any comment for the same * * @param string $param the name of the parameter/option as defined in your plugin and especially in the get_default_option of your plugin * @return void */ function remove_param($param) { $search_comment = false ; foreach($this->buffer as $j=>$i){ if (!$search_comment) { if($i[0] == $param){ unset($this->buffer[$j]) ; $search_comment = true ; } } else { if ($i[0] == "comment"){ unset($this->buffer[$j]) ; } else { return ; } } } $this->buffer = array_values($this->buffer) ; } /** ==================================================================================================================================================== * Print the form with parameters * * @return void */ function flush() { global $_POST ; global $_FILES ; global $wpdb ; $this->buffer[] = array('end', "") ; // We create the beginning of the form $this->output = "

".__("Parameters",'SL_framework')."

" ; if ($this->obj->getPluginID()!="") { $this->output .= "

".__("Here are the parameters of the plugin. Modify them at will to fit your needs.","SL_framework")."

" ; } else { $this->output .= "

".__("Here are the parameters of the framework. Modify them at will to fit your needs.","SL_framework")."

" ; } $this->output .= "
\n" ; // We compute the parameter output $hastobeclosed = false ; $maj = false ; $modified = false ; $error = false ; $warning = false ; $toExecuteWhenLoaded = "" ; $macroisdisplayed_count = 0 ; $macroisdisplayed = false ; $macroisdisplayed_avoidnext = false ; for($iii=0; $iiibuffer); $iii++) { $ligne = $this->buffer[$iii] ; // Is it a title if (($ligne[0]=="end")||($ligne[0]=="title")||($ligne[0]=="title_macro")) { if ($hastobeclosed) { $this->output .= $currentTable->flush()."
" ; $hastobeclosed = false ; } // On test si on doit recommencer if (($macroisdisplayed) && (!$macroisdisplayed_avoidnext)) { $nnn = 1 ; // We search for the next parameter $found_param=false ; while (isset($this->buffer[$macro_lasttitle+$nnn])) { $first_param_after = $this->buffer[$macro_lasttitle+$nnn] ; if ($first_param_after[0]=='param') { $found_param = true ; $first_param_after = $first_param_after[1] ; break ; } else if ($first_param_after[0]=='comment') { $nnn ++ ; } else { break ; } } // if the param has been found if ($found_param) { $all_names = $this->obj->get_name_params() ; if (in_array($first_param_after."_macro".($macroisdisplayed_count+1), $all_names)) { $iii = $macro_lasttitle-1 ; $macroisdisplayed_count ++ ; $macroisdisplayed_avoidnext = true ; continue ; } else { $macroisdisplayed_count=0; $macroisdisplayed = false ; $macroisdisplayed_avoidnext = false ; } } } $macroisdisplayed_avoidnext = false ; // We create a new table $currentTable = new SLFramework_Table() ; $currentTable->removeFooter() ; $hastobeclosed = true ; if ($ligne[0]=="title") { $currentTable->title(array($ligne[1], "") ) ; $macroisdisplayed = false ; $macroisdisplayed_text = "" ; } else if ($ligne[0]=="title_macro"){ // Add delete button $params = "[" ; $count_param_temp = 0 ; $nnn=1 ; while (isset($this->buffer[$iii+$nnn])) { $first_param_after = $this->buffer[$iii+$nnn] ; if ($first_param_after[0]=='param') { if ($count_param_temp!=0) { $params .= "," ; } $params .= "\"".$first_param_after[1]."_macro".$macroisdisplayed_count."\"" ; $nnn ++ ; $count_param_temp ++ ; } else if ($first_param_after[0]=='comment') { $nnn ++ ; } else { break ; } } $params .= "]" ; $md5 = sha1($params) ; $delete = " ".__('(Delete)', 'SL_framework')."" ; $x = plugin_dir_url("/").'/'.str_replace(basename(__FILE__),"",plugin_basename(__FILE__)) ; $delete .= "" ; // Add add button $add = "" ; $macroisdisplayed_text = $ligne[2] ; if ($macroisdisplayed_count==0) { $params = "[" ; $count_param_temp = 0 ; $nnn=1 ; while (isset($this->buffer[$iii+$nnn])) { $first_param_after = $this->buffer[$iii+$nnn] ; if ($first_param_after[0]=='param') { if ($count_param_temp!=0) { $params .= "," ; } $params .= "\"".$first_param_after[1]."_macro\"" ; $nnn ++ ; $count_param_temp ++ ; } else if ($first_param_after[0]=='comment') { $nnn ++ ; } else { break ; } } $params .= "]" ; $md5 = sha1($params) ; $add = " (".$macroisdisplayed_text.")" ; $x = plugin_dir_url("/").'/'.str_replace(basename(__FILE__),"",plugin_basename(__FILE__)) ; $add .= "" ; } if (strpos($ligne[1],"%s")!==false) { $currentTable->title(array(sprintf($ligne[1], $macroisdisplayed_count+1).$delete.$add, "")) ; } else { $currentTable->title(array($ligne[1].$delete, "")) ; } $macro_lasttitle = $iii ; $macroisdisplayed_count_elements = 0 ; $macroisdisplayed = true ; } } // compte le nombre d element dans la macro if ($macroisdisplayed) { $macroisdisplayed_count_elements ++ ; } else { $macroisdisplayed_count_elements = 0 ; } // Is it a comment if ($ligne[0]=="comment") { if (!$hastobeclosed) { // We create a default table as no title has been provided $currentTable = new SLFramework_Table() ; $currentTable->removeFooter() ; $currentTable->title(array(__("Parameters","SL_framework"), __("Values","SL_framework")) ) ; $hastobeclosed = true ; } $cl = "

".$ligne[1]."

" ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cel_value = new adminCell("") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } // Is it a param if ($ligne[0]=="param") { $param = $ligne[1] ; $param_default = $ligne[1] ; //macro if ($macroisdisplayed) { $param = $param."_macro".$macroisdisplayed_count ; } $name = $ligne[2] ; $forbid = $ligne[3] ; $allow = $ligne[4] ; $related = $ligne[5] ; if (!$hastobeclosed) { // We create a default table as no title has been provided $currentTable = new SLFramework_Table() ; $currentTable->removeFooter() ; $currentTable->title(array(__("Parameters","SL_framework"), __("Values","SL_framework")) ) ; $hastobeclosed = true ; } // What is the type of the parameter ? //--------------------------------------- $type = "string" ; if (is_bool($this->obj->get_default_option($param_default))) $type = "boolean" ; if (is_int($this->obj->get_default_option($param_default))) $type = "int" ; if (is_array($this->obj->get_default_option($param_default))) $type = "list" ; // C'est un text si dans le texte par defaut, il y a une etoile if (is_string($this->obj->get_default_option($param_default))) { if (strpos($this->obj->get_default_option($param_default), "*") === 0) $type = "text" ; } // C'est un file si dans le texte par defaut est egal a [file] if (is_string($this->obj->get_default_option($param_default))) { if (str_replace("[file]","",$this->obj->get_default_option($param_default)) != $this->obj->get_default_option($param_default)) $type = "file" ; } // C'est un password si dans le texte par defaut est egal a [password] if (is_string($this->obj->get_default_option($param_default))) { if (str_replace("[password]","",$this->obj->get_default_option($param_default)) != $this->obj->get_default_option($param_default)) $type = "password" ; } // C'est un media si dans le texte par defaut est egal a [media] if (is_string($this->obj->get_default_option($param_default))) { if (str_replace("[media]","",$this->obj->get_default_option($param_default)) != $this->obj->get_default_option($param_default)) $type = "media" ; } // C'est un page si dans le texte par defaut est egal a [page] if (is_string($this->obj->get_default_option($param_default))) { if (str_replace("[page]","",$this->obj->get_default_option($param_default)) != $this->obj->get_default_option($param_default)) $type = "page" ; } // We reset the param //--------------------------------------- $problem_e = "" ; $problem_w = "" ; if (isset($_POST['resetOptions'])) { $maj = true ; $new_param = $this->get_new_value($param_default) ; $modified = true ; $this->obj->set_param($param, $new_param) ; } // We update the param //--------------------------------------- $problem_e = "" ; $problem_w = "" ; if (isset($_POST['submitOptions'])) { $maj = true ; $new_param = $this->get_new_value($param) ; $old_param = $this->obj->get_param($param) ; if (is_array($new_param) && (isset($new_param[0])) && ($new_param[0]=='error')) { $problem_e .= $new_param[1] ; $error = true ; } else { // Warning management if (($type=="string")||($type=="text")||($type=="password")) { if (isset($_POST[$param])) { if ($new_param!=stripslashes($_POST[$param])) { $problem_w .= "

".__('Warning: some characters have been removed because they are not allowed here', 'SL_framework')." (".$forbid.")!

\n" ; $warning = true ; } } } // Update of the value if ($new_param != $old_param) { $modified = true ; $this->obj->set_param($param, $new_param) ; SLFramework_Debug::log(get_class(), "The parameter ".$param." of the plugin ".$this->obj->getPluginID()." have been modified", 4) ; } } } // We built a new line for the table //--------------------------------------- if ($type=="boolean") { $cl = "

" ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $checked = "" ; if ($this->obj->get_param($param)) { $checked = "checked" ; } if (count($related)>0) { $onClick = "onClick='activateDeactivate_Params(\"".$param."\",new Array(\"".implode("\",\"", $related)."\"))'" ; $toExecuteWhenLoaded .= "activateDeactivate_Params(\"".$param."\",new Array(\"".implode("\",\"", $related)."\"));\n" ; } else { $onClick = "" ; } $workaround = "" ; $cel_value = new adminCell("

".$workaround."

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="int") { $ew = "" ; if ($problem_e!="") { $ew .= "
".$problem_e."
" ; } if ($problem_w!="") { $ew .= "
".$problem_w."
" ; } $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cel_value = new adminCell("

".__('(integer)', 'SL_framework')."

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="string") { $ew = "" ; if ($problem_e!="") { $ew .= "
".$problem_e."
" ; } if ($problem_w!="") { $ew .= "
".$problem_w."
" ; } $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cel_value = new adminCell("

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="password") { $ew = "" ; if ($problem_e!="") { $ew .= "
".$problem_e."
" ; } if ($problem_w!="") { $ew .= "
".$problem_w."
" ; } $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cel_value = new adminCell("

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="text") { $num = min(22,count(explode("\n", $this->obj->get_param($param))) + 1) ; $ew = "" ; if ($problem_e!="") { $ew .= "
".$problem_e."
" ; } if ($problem_w!="") { $ew .= "
".$problem_w."
" ; } $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cel_value = new adminCell("

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="list") { $cl = "

" ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cc = "" ; ob_start() ; ?>

add_line(array($cel_label, $cel_value), '1') ; } if ($type=="media") { $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; // If this is the URL of an auto-generated thumbnail, get the URL of the original image $attachment_url = preg_replace( '/-\d+x\d+(?=\.(jpg|jpeg|png|gif)$)/i', '', $this->obj->get_param($param) ); $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';",$attachment_url)); if (isset($attachment[0])) { $id_media = $attachment[0]; $msg_media = "

".sprintf(__("The URL is correct and the ID of the media file is %s.",'SL_framework'),''.$id_media."")."

" ; if (wp_attachment_is_image( $id_media )) { $msg_media .= '

'.wp_get_attachment_image( $id_media, "thumbnail").'

' ; } else { $msg_media .= '

".__("The URL is not a media file.",'SL_framework')."

" ; } $cel_value = new adminCell("

".$msg_media) ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="page") { $cl = "

"; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $selected = 0 ; if ($this->obj->get_param($param)!="[page]") { $selected = $this->obj->get_param($param) ; } $cel_value = new adminCell("

".wp_dropdown_pages(array('echo' => 0,'name' => $param, 'selected' => $selected, "show_option_none" => __('(none)', "SLFramework"), "option_none_value"=>'[page]'))."

") ; $currentTable->add_line(array($cel_label, $cel_value), '1') ; } if ($type=="file") { $ew = "" ; if ($problem_e!="") { $ew .= "
".$problem_e."
" ; } if ($problem_w!="") { $ew .= "
".$problem_w."
" ; } $cl = "

".$ew ; // We check if there is a comment just after it while (isset($this->buffer[$iii+1])) { if ($this->buffer[$iii+1][0]!="comment") break ; $cl .= "

".$this->buffer[$iii+1][1]."

" ; $iii++ ; } $cel_label = new adminCell($cl) ; $cc = "" ; ob_start() ; $upload_dir = wp_upload_dir(); if (!file_exists($upload_dir["basedir"].$this->obj->get_param($param))) { $this->obj->set_param($param,$this->obj->get_default_option($param_default)) ; } if ($this->obj->get_default_option($param_default)==$this->obj->get_param($param)) { ?>

obj->get_param($param) ; $pathdir = $upload_dir["basedir"].$this->obj->get_param($param) ; $info = pathinfo($pathdir) ; if ((strtolower($info['extension'])=="png") || (strtolower($info['extension'])=="gif") || (strtolower($info['extension'])=="jpg") ||(strtolower($info['extension'])=="bmp")) { list($width, $height) = getimagesize($pathdir) ; $max_width = 100; $max_height = 100; $ratioh = $max_height/$height; $ratiow = $max_width/$width; $ratio = min($ratioh, $ratiow); // New dimensions $width = min(intval($ratio*$width), $width); $height = min(intval($ratio*$height), $height); ?>

obj->get_param($param) ; ?>

' width="75px" style="vertical-align:middle;"/> obj->get_param($param) ; ?>

") ; ?>

add_line(array($cel_label, $cel_value), '1') ; } } // End is it a param? } // We finish the form output ob_start(); ?>
 

output .= ob_get_clean(); echo $this->output ; } } } ?>