<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');

  if(!$user->getAcl("Latest-Twitts")): print $core->msgAlert(_CG_ONLYADMIN, false); return; endif;
    
$filename = $_SERVER['DOCUMENT_ROOT'] . "/admin/modules/twitts/lang/" . $core->language . ".lang.php";
 
 if (file_exists($filename)) {
 require_once("lang/" . $core->language . ".lang.php");
 } else {
 require_once("lang/en.lang.php");
 }
 
  require_once("admin_class.php");
  
  $twitt = new latestTwitts();
?>
<h1><img src="images/mod-sml.png" alt="" /><?php echo MOD_TW_TITLE1;?></h1>
<p class="info"><?php echo MOD_TW_INFO1 . _REQ1. required() . _REQ2;?></p>
<h2><?php echo MOD_TW_SUBTITLE1;?></h2>
<form action="" method="post" id="admin_form" name="admin_form">
  <table cellspacing="0" cellpadding="0" class="formtable">
    <tr>
      <td width="200"><?php echo MOD_TW_USER;?>:<?php echo required();?></td>
      <td><input name="username" type="text" class="inputbox required" value="<?php echo $twitt->username;?>" size="20" title="<?php echo MOD_TW_USER_R;?>"/>
      <?php echo tooltip(MOD_TW_USER_T);?></td>
    </tr>
    <tr>
      <td><?php echo MOD_TW_COUNT;?>:<?php echo required();?></td>
      <td><input name="counter" type="text" class="inputbox required" value="<?php echo $twitt->counter;?>" size="5" title="<?php echo MOD_TW_COUNT_R;?>"/>
        <?php echo tooltip(MOD_TW_COUNT_T);?></td>
    </tr>
    <tr>
      <td><?php echo MOD_TW_TRANS_S;?>: <?php echo required();?></td>
      <td><input name="speed" type="text" class="inputbox required" value="<?php echo $twitt->speed;?>" size="5" title="<?php echo MOD_TW_COUNT_R;?>"/>
        <?php echo tooltip(MOD_TW_TRANS_S_T);?></td>
    </tr>
    <tr>
      <td><?php echo MOD_TW_SHOW_IMG;?>:</td>
      <td><span class="input-out">
        <label for="show_image-1"><?php echo _YES;?></label>
        <input name="show_image" type="radio" id="show_image-1"  value="1" <?php getChecked($twitt->show_image, 1); ?> />
        <label for="show_image-2"><?php echo _NO;?></label>
        <input name="show_image" type="radio" id="show_image-2" value="0" <?php getChecked($twitt->show_image, 0); ?> />
        <?php echo tooltip(MOD_TW_SHOW_IMG_T);?></span></td>
    </tr>
    <tr>
      <td><?php echo MOD_TW_TRANS_T;?>: <?php echo required();?></td>
      <td><input name="timeout" type="text" class="inputbox required" value="<?php echo $twitt->timeout;?>" size="5" title="<?php echo MOD_TW_COUNT_R;?>"/>
        <?php echo tooltip(MOD_TW_TRANS_S_T);?></td>
    </tr>
    <tr>
      <td><input type="submit" name="submit" class="button" value="<?php echo MOD_TW_UPDATE;?>" /></td>
      <td><a href="loader.php?do=modules" class="button-alt"><?php echo _CANCEL;?></a></td>
    </tr>
  </table>
</form>
<?php echo $core->doForm("processConfig","modules/twitts/controller.php");?>