mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02:00
more exetensions to my graphics class
This commit is contained in:
parent
a5c016a725
commit
2222b135ef
@ -18,11 +18,12 @@
|
|||||||
|
|
||||||
$button = CreateObject('phpgwapi.graphics');
|
$button = CreateObject('phpgwapi.graphics');
|
||||||
|
|
||||||
|
$button->parseHTTPPostVars();
|
||||||
$button->createInputButton(lang('save'), 'save');
|
$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 $button->createInputButton("Lars is the best ;)",'submit');
|
||||||
print "<br>the same as ascii<br>";
|
print "<br>the same as ascii<br>";
|
||||||
print $button->createInputButton("Lars is the best ;)",'submit','ascii');
|
print $button->createInputButton("Lars is the best ;)",'submit','ascii');
|
||||||
|
@ -68,4 +68,31 @@ class graphics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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()";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user