Small link functions.
[readifood.git] / lib / functions.php
index 511e0cf..e970f54 100644 (file)
     echo "Day: <input name=\"$name" . "_d\" value=\"$d\" size=2 maxlen=2> ";
   }
 
+  function get_small_link() {
+    /* Args are <alt text>, <format>, [<stuff> ...] */
+    $args = func_get_args();
+    $html = htmlspecialchars(array_shift($args));
+    $url = array_shift($args);
+    return vsprintf("<a class=\"small noprint\" href=\"$url\">$html</a>\n", $args);
+  }
+
+  function small_link() {
+    echo call_user_func_array("get_small_link", func_get_args());
+  }
+
   include_once("$lib_root/admin.php");
   include_once("$lib_root/forms.php");