5 // Allow the user to add more icons
6 $numicons = db_query("select count(*) as iconnum from icons where owner = " . $page_owner);
7 $numicons = $numicons[0]->iconnum
;
8 if ($page_owner != $_SESSION['userid']) {
9 $iconquota = db_query("select icon_quota from users where ident = " . $page_owner);
10 $iconquota = $iconquota[0]->icon_quota
;
12 $iconquota = $_SESSION['icon_quota'];
15 if ($numicons < $iconquota) {
17 $header = gettext("Upload a new picture"); // gettext variable
18 $desc = gettext("Upload a picture for this profile below. Pictures need to be 100x100 pixels or smaller, but don't worry - if you've selected a larger picture, we'll shrink it down for you. You may upload up to"); // gettext variable
19 $desc_two = gettext("pictures in total."); // gettext variable
24 {$iconquota} $desc_two
26 <form action
="" method
="post" enctype
="multipart/form-data">
28 $name = "<label for=\"iconfile\">" . gettext("Picture to upload:") . "</label>";
30 <input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"2000000\" />
31 <input name=\"iconfile\" id=\"iconfile\" type=\"file\" />
33 $body .= run("templates:draw", array(
34 'context' => 'databox',
39 $name = "<label for=\"icondescription\">". gettext("Icon description:") ."</label>";
40 $column1 = "<input type=\"text\" name=\"icondescription\" id=\"icondescription\" value=\"\" />";
41 $body .= run("templates:draw", array(
42 'context' => 'databox',
47 $name = "<label for=\"icondefault\">" . gettext("Make this the default icon:") . "</label>";
49 <select name=\"icondefault\" id=\"icondefault\">
50 <option value=\"yes\">".gettext("Yes")."</option>
51 <option value=\"no\">".gettext("No")."</option>
54 $body .= run("templates:draw", array(
55 'context' => 'databox',
60 $upload = gettext("Upload new icon"); // gettext variable
62 <p
><input type
="hidden" name
="action" value
="icons:add" />
63 <input type
="submit" value
="$upload" /></p
>
68 $iconQuota = sprintf(gettext("The icon quota is 1st: $s and you have 2nd: $s icons uploaded. You may not upload any more icons until you've deleted some."),$iconquota,$numicons); // gettext variable NOT SURE!!!