예제 #1
0
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
if (in_array('propose', $_SESSION['privs']) && $is_category) {
    ?>
 <form class="newreferendum" method="post" enctype="multipart/form-data">
  <h2><?php 
    E_("Add new referendum");
    ?>
</h2>
  <table>
   <?php 
    echo drawInputRow(T_("Referendum title"), "<input name='new_referendum_title' value='{$_POST["new_referendum_title"]}'>");
    echo drawInputRow(T_("Text"), "<textarea name='new_referendum_text'></textarea>");
    echo drawInputRow('', "<input name='new_referendum' type='submit' value='" . T_("Create") . "'>");
    ?>
  </table>
 </form>

<?php 
}
<?php

/*
DemoWave
Copyright (C) 2006 RedHog (Egil Möller) <*****@*****.**>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
E_("Search for referendums in all categories");
예제 #3
0
Copyright (C) 2006 RedHog (Egil Möller) <*****@*****.**>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
?>
<h2><?php 
E_("Sub-categories");
?>
</h2>
<ul>
 <?php 
foreach ($subcategories as $category) {
    $args = queryString(queryConstruct(array('category' => $category_path_connect . $category), array('categoryview'), array('referendum_search_')));
    echo "<li><a href='{$_SERVER["SCRIPT_NAME"]}?{$args}'>{$category}</a></li>";
}
?>
</ul>
예제 #4
0
if (in_array('propose', $_SESSION['privs']) && $is_category) {
    ?>
 <form class="newreferendum" method="post" enctype="multipart/form-data">
  <input type="hidden" name='new_referendum_add' value='false'>
  <?php 
    $referendum_type_ids = array_values($referendum_types);
    $referendum_random_type_id = $referendum_type_ids[0];
    ?>
  <input type="hidden" name='new_referendum_type' value='<?php 
    echo $referendum_random_type_id;
    ?>
'>
  <input type="hidden" name='new_referendum_breakpoint' value='1 second'>

  <h2><?php 
    E_("Delete category");
    ?>
</h2>
  <table>
   <?php 
    $referendum_subcategory_options = array();
    foreach ($subcategories as $category) {
        $referendum_subcategory_options[] = "<option value='{$category}'>{$category}</option>";
    }
    echo drawInputRow(T_("Category title"), "<select name='new_referendum_path'>" . implode('\\n', $referendum_subcategory_options) . "</select>", 'referendum-type');
    echo drawInputRow('', "<input name='new_referendum' type='submit' value='" . T_("Delete category") . "'>");
    ?>
  </table>
 </form>

<?php 
예제 #5
0
파일: user.php 프로젝트: redhog/DemoWave
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
?>
<form action="<?php 
echo $_SERVER["SCRIPT_NAME"] . '?' . queryString(queryConstruct());
?>
" method="post" enctype="multipart/form-data">
 <?php 
echo "<h2>" . T_("Name") . "</h2>\n";
echo "<table>\n";
echo drawInputRow(T_("Username"), $user_username);
echo drawInputRow(T_("Given name"), "<input name='user_givenname' type='text' value='{$user_givenname}' />");
echo drawInputRow(T_("Surname"), "<input name='user_surname' type='text' value='{$user_surname}' />");
echo "</table>\n";
echo "<h2>" . T_("Password") . "</h2>\n";
echo "<table>\n";
echo drawInputRow(T_("New password"), "<input name='user_password1' type='password' />");
echo drawInputRow(T_("Retype password"), "<input name='user_password2' type='password' />");
echo "</table>\n";
?>
 <input type="submit" name="save_user" value="<?php 
E_("Save");
?>
" />
</form>
예제 #6
0
" method="post" enctype="multipart/form-data">

 <h2><?php 
E_("Name");
?>
</h2>
 <table>
  <?php 
echo drawInputRow("Username", "<input name='register_username' type='text' />");
echo drawInputRow("Given name", "<input name='register_givenname' type='text' />");
echo drawInputRow("Surname", "<input name='register_surname' type='text' />");
?>
 </table>

 <h2><?php 
E_("Password");
?>
</h2>
 <table>
  <?php 
echo drawInputRow("New password", "<input name='register_password1' type='password' />");
echo drawInputRow("Retype password", "<input name='register_password2' type='password' />");
?>
 </table>

 <input type="submit" name="save_register" value="<?php 
E_("Register");
?>
" />
</form>
예제 #7
0
파일: login.php 프로젝트: redhog/DemoWave
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
?>
<h1><?php 
E_("Log in");
?>
</h1>

<form action="<?php 
echo $_SERVER["SCRIPT_NAME"] . '?' . queryString(queryConstruct());
?>
" method="post" enctype="multipart/form-data">
 <table>
  <?php 
printf(T_("<tr><td>Username:</td><td>%s</td></tr>"), "<input name='login_user' type='text' />");
printf(T_("<tr><td>Password:</td><td>%s</td></tr>"), "<input name='login_password' type='password' />");
?>
 </table>
 <input type="submit" name="save_login" value="<?php 
E_("Log in");
?>
" />
</form>
예제 #8
0
        echo drawSearchField(T_('Current'), 'referendum_search_sum', false, 'bound', 10, 'current-vote-sum');
        ?>
     </tr>
     <tr>
      <?php 
        echo drawSearchField(T_('Started'), 'referendum_search_start', false, 'bound', 10, 'start');
        echo drawSearchField(T_('Vote'), 'referendum_search_last', false, 'bound', 10, 'current-vote');
        ?>
     </tr>
     <tr>
      <?php 
        echo drawSearchField(T_('Estimate'), 'referendum_search_completed', false, 'bound', 10, 'completed');
        if ($category_type == 'law') {
            echo drawSearchField(T_('Paragraphs'), 'referendum_search_path', false, 'multimatch', 10, 'law-paragraph');
        }
        ?>
     </tr>
     <tr>
      <?php 
        echo drawSearchField(T_('Status'), 'referendum_search_status', array(T_('Passed') => 1, T_('Active') => 0, T_('Rejected') => -1), 'list', 10, 'referendum-status');
        ?>
     </tr>
    </table>
    <input type="submit" name="search_referendums" value="<?php 
        E_("Search");
        ?>
">
   </form>
  <?php 
    }
}
예제 #9
0
            }
            foreach ($referendums as $attr) {
                $proposals[] = $attr['referendum'];
            }
            $proposals = implode(",", $proposals);
            $url = '?' . queryString(queryConstruct(array('categoryview' => 'law', 'law_show__deleted_list' => 'on', 'law_date' => $attr['completed'], 'law_show__referendum_list' => '1', 'law_proposal' => $proposals)));
            ?>
      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td><?php 
            printf("<a href='%s'>%s</a>\n", $url, T_("Law view"));
            ?>
</td></tr>
    <?php 
        }
        if ($_GET['categoryview'] == 'referendums') {
            ?>
    <tr><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="submit" name="save_referendums_vote" value="<?php 
            E_("Cast votes");
            ?>
"></td></tr>
    <?php 
        }
    }
    ?>
 </table>
 <?php 
    echo drawPrevNextPage($referendums_len, $referendum_page_start, $referendum_page_len, 'referendum_page_start', 'referendum_page_len');
    ?>
</form>

<?php 
}
예제 #10
0
<?php

/*
DemoWave
Copyright (C) 2006 RedHog (Egil Möller) <*****@*****.**>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
E_("Account settings");
예제 #11
0
파일: users.php 프로젝트: redhog/DemoWave
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
function drawUserOption($default, $value, $comment)
{
    if ($default) {
        return "<option value='unchanged' selected='1'>{$comment}</option>";
    } else {
        return "<option value='{$value}'>{$comment}</option>";
    }
}
?>

<h1><?php 
E_("Search for users");
?>
</h1>
<form action="<?php 
echo $_SERVER["SCRIPT_NAME"] . '?' . queryString(queryConstruct());
?>
" method="get" enctype="multipart/form-data">
 <?php 
foreach ($_GET as $key => $value) {
    if (!beginsWith($key, 'users_search_')) {
        echo "<input name='{$key}' value='{$value}' type='hidden'>\n";
    }
}
?>
 <table>
  <tr> 
예제 #12
0
파일: logout.php 프로젝트: redhog/DemoWave
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
?>
<h1><?php 
E_("Really log out?");
?>
</h1>

<form action="<?php 
echo $_SERVER["SCRIPT_NAME"] . '?' . queryString(queryConstruct());
?>
" method="post" enctype="multipart/form-data">

 <input type="submit" name="save_logout" value="<?php 
E_("Log out");
?>
" />
</form>
예제 #13
0
 <table class="law_importexport">
  <?php 
echo drawInputRow(T_("Import from file"), "<input name='law_import_file' type='file'>");
echo drawInputRow('', "<input name='law_import' type='submit' value='" . T_("Import") . "'>");
$lawexporturl = '?' . queryString(queryConstruct(array('categoryview' => 'laweditor', 'format' => 'export', 'law_edit_continue' => 'yes')));
echo drawInputRow(T_("Export to file"), "<a href='{$lawexporturl}' target='demowave-export'>" . T_("Export") . "</a>");
?>
 </table>

 <table>
  <?php 
$title = array_get($_SESSION["laweditor"], "title", "");
echo drawInputRow(T_("Change summary"), "<input type='text' name='law_title' value='{$title}' />");
echo drawInputRow('', "<input name='law_save' type='submit' value='" . T_("Save changes") . "'>");
?>
 </table>

 <h3><?php 
E_("Contents");
?>
</h3>
 <?php 
echo drawLawContentList($_SESSION["laweditor"]['laws']);
?>

 <?php 
drawLaw(0, $_SESSION["laweditor"]['laws']);
?>
</form>
예제 #14
0
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
if (in_array('propose', $_SESSION['privs']) && $is_category) {
    ?>
 <form class="newreferendum" method="post" enctype="multipart/form-data">
  <input type="hidden" name='new_referendum_add' value='true'>
  <h2><?php 
    E_("Add new category");
    ?>
</h2>
  <table>
   <?php 
    echo drawInputRow(T_("Category title"), "<input name='new_referendum_path'>", 'categorypath');
    $referendum_type_options = array();
    foreach ($referendum_types as $name => $id) {
        $name = T_($name);
        $referendum_type_options[] = "<option value='{$id}'>{$name}</option>";
    }
    echo drawInputRow(T_("For referendums of type"), "<select name='new_referendum_type'>" . implode('\\n', $referendum_type_options) . "</select>", 'referendum-type');
    echo drawInputRow(T_("Breakpoint"), "<input name='new_referendum_breakpoint' value='{$category_breakpoint}'>", 'breakpoint');
    echo drawInputRow(T_("Description"), "<textarea name='new_referendum_text'></textarea>");
    echo drawInputRow('', "<input name='new_referendum' type='submit' value='" . T_("Create") . "'>");
    ?>