forked from extern/egroupware
more exetensions to my graphics class
This commit is contained in:
parent
a5c016a725
commit
2222b135ef
@ -18,11 +18,12 @@
|
||||
|
||||
$button = CreateObject('phpgwapi.graphics');
|
||||
|
||||
$button->parseHTTPPostVars();
|
||||
$button->createInputButton(lang('save'), 'save');
|
||||
|
||||
if (isset($submit)) print "it workied<br>";
|
||||
if (isset($submit)) print "is worked $submit<br>";
|
||||
|
||||
print "<form>";
|
||||
print "<form method=post>";
|
||||
print $button->createInputButton("Lars is the best ;)",'submit');
|
||||
print "<br>the same as ascii<br>";
|
||||
print $button->createInputButton("Lars is the best ;)",'submit','ascii');
|
||||
|
@ -67,5 +67,32 @@ class graphics
|
||||
return '<input type="submit" value="'.$_text.'" name="'.$_name.'">';
|
||||
}
|
||||
}
|
||||
|
||||
// this function checks, if there is a variable $aaa_x and $aaa_y
|
||||
// if so, it will create a new variable $aaa
|
||||
function parseHTTPPostVars()
|
||||
{
|
||||
// execute only if libgd support is enabled
|
||||
if (!extension_loaded("gd")) return;
|
||||
|
||||
global $HTTP_POST_VARS;
|
||||
|
||||
if (is_array($HTTP_POST_VARS))
|
||||
{
|
||||
while( list($key, $val) = each($HTTP_POST_VARS))
|
||||
{
|
||||
if (ereg("(.*)_x",$key,$varName) && $HTTP_POST_VARS[$varName[1]."_y"])
|
||||
{
|
||||
$name = $varName[1];
|
||||
global $$name;
|
||||
$$name = "content generated by parseHTTPPostVars()";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -178,4 +178,4 @@
|
||||
}
|
||||
}
|
||||
} //end of preferences class
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user