function module_postadd() { global $SMARTY, $_POST; if ($_POST['refid'] == '') { $_POST['refid'] = 0; } if ($_POST['title'] == '') { $error['title'] = trans('This cannot be empty'); } if ($_POST['body'] == '') { $error['body'] = trans('This cannot be empty'); } if (!$error) { add_solution($_POST['refid'], $_POST['title'], $_POST['body']); header('Location: ?m=userpanel&module=help'); } else { $solution['refid'] = $_POST['refid']; $solution['title'] = $_POST['title']; $solution['body'] = $_POST['body']; $SMARTY->assign('solution', $solution); $SMARTY->assign('error', $error); $SMARTY->display('module:help:add.html'); } }
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Five-in-line project</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <h1>Five-in-line solving tree project</h1> <p>Project sources on <a href="https://code.google.com/p/five-in-line/">https://code.google.com/p/five-in-line/</a></p> <table cellSpacing="8"> <?php function add_solution($path_name) { echo "<tr><td><a href=\"solutions/{$path_name}/\"><img src=\"solutions/{$path_name}/avatar.png\"/ width=\"32\" height=\"32\"></a></p></td></tr>"; } add_solution("root"); ?> </table> <table cellSpacing="8"> <?php function add_version($d, $m, $y) { echo "<tr><td>{$d}.{$m}.{$y}</td><td><a href=\"download/five_in_line{$y}{$m}{$d}.zip\">GUI Game</a><td><a href=\"download/db{$y}{$m}{$d}.zip\">Server</a></td></tr>"; } add_version("22", "10", "2013"); add_version("04", "10", "2013"); ?> </table> </body>