Exemplo n.º 1
0
function no_division_found($plural)
{
    $title = "Division{$plural} not found";
    pw_header();
    print "<p>Public Whip does not have this/these divisions.  Perhaps it\n    \t\t  doesn't exist, or it hasn't been added to The Public Whip yet.\n\t\t      New divisions are added one or two working days after they happen.</p>\n\t\t     <p><a href=\"divisions.php\">Browse for a division</a> </p>";
    pw_footer();
    exit;
}
Exemplo n.º 2
0
            if ($ret) {
                $new_dreamid = mysql_insert_id();
                $ok = true;
                $feedback = "Successfully made new policy <a href=\"/policy.php?id={$new_dreamid}\">" . html_scrub($name) . "</a>.  To \n                    select votes for your new policy, <a href=\"../search.php\">search</a> or\n                    <a href=\"../divisions.php\">browse</a> for divisions.  On the page for\n                    each division you can choose how somebody supporting your policy would have voted.";
                if (user_getid()) {
                    $db->query("update pw_dyn_user set active_policy_id = {$new_dreamid} where user_id = " . user_getid());
                }
                audit_log("Added new policy '" . $name . "'");
                dream_post_forum_action($db, $new_dreamid, "Created brand new policy.\n\n[b]New Policy:[/b] [url=http://www.publicwhip.org.uk/policy.php?id=" . $new_dreamid . "]" . stripslashes($name) . "[/url]\n[b]Definition:[/b] " . stripslashes($description));
            } else {
                $feedback = "Failed to add new policy. " . mysql_error();
            }
        }
    }
    $title = "Make a new policy";
    pw_header();
    if ($feedback && !$just_logged_in) {
        if ($ok) {
            echo "<p>{$feedback}</p>";
        } else {
            echo "<div class=\"error\"><h2>Creating a new policy not complete, please try again\n                </h2><p>{$feedback}</div>";
        }
    } else {
        ?>
<p>Here you have to name and describe
        the policy.  Afterwards, you will be able to select which votes
        support the policy.  The new policy can represent anything you like.
        Some examples:
        <ul>
        <li>Equal laws for heterosexuals and homosexuals.
        <li>Privatise the NHS.