Пример #1
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
*/
if ($is_category) {
    echo "<table class='category_info_table'>\n";
    echo drawInputRow(T_("Type"), drawHelpAnnotation(T_($category_type), 'referendum-type-' . $category_type), 'referendum-type');
    echo drawInputRow(T_("Breakpoint"), $category_breakpoint, 'breakpoint');
    echo "</table>\n";
    echo $category_text;
}
Пример #2
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 
}
Пример #3
0
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>
Пример #4
0
    ?>
 <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
" 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>
Пример #6
0
 <input type='hidden' name='law_edit_continue' value='yes' />

 <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>
Пример #7
0
$title = T_("Select what to show");
echo "<h2 class='{$status}'><a href='{$_SERVER["SCRIPT_NAME"]}?{$args}'>{$title}</a></h2>";
if (isset($_GET['select_law_view']) && $_GET['select_law_view']) {
    echo "<form method='get' enctype='multipart/url-encoded'>\n";
    foreach ($_GET as $key => $value) {
        if (!beginsWith($key, 'law_')) {
            echo "<input name='{$key}' value='{$value}' type='hidden'>\n";
        }
    }
    echo "<table>";
    echo " <tr>";
    echo "  <td>";
    echo "   <table>\n";
    echo "    <tr>" . drawSearchField(T_("Show paragraphs as of"), 'law_date', false, 'match') . "</tr>\n";
    echo "    <tr>" . drawSearchField(T_("Show"), 'law_show', array(T_("Deleted paragraphs") => 'deleted', T_("Last change") => 'referendum'), 'list') . "</tr>\n";
    echo drawInputRow("", "<input type='submit' name='selectdate_law' value='" . T_("Show") . "' />");
    echo "   </table>\n";
    echo "  </td>";
    echo "  <td>";
    echo "   <table>\n";
    echo "    <tr>" . drawSearchField(T_("Show differences introduced by"), 'law_proposal', false, 'match') . "</tr>\n";
    echo "    <tr>";
    echo "     <td>";
    echo "     </td>";
    echo "     <td>";
    echo "      <ul class='law_proposal_list'>";
    foreach ($law_proposal as $proposal) {
        $proposals = array();
        if (isset($_GET["law_proposal"]) && $_GET["law_proposal"]) {
            $proposals = explode(',', $_GET["law_proposal"]);
        }