<?
/**
 * VoiceOne Fax
 *
 * Frontend to fax service
 * @package fax
 * @subpackage  fax
 * @todo Needs documentation and implementation
 */
  include ("../admin/config/cfg.php");
  global $cwBasePath,$cwlang,$cwUserInfo,$cwUserId;
  //================ PAGE LOGIC ================
  if((!_isModuleLoaded('fax'))||(!_hasFaxAccess())) goToMainPage('',"../");
  $faxUsername=$cwUserInfo['username'];
  $faxPassword=$cwUserInfo['password'];
  //================ MAIN PAGE ================
  ob_start();
  ?>
    <!-- iFRAME -->
    <div style="width:100%; text-align:center;">
      <iframe style="margin: 0;" src="/fax/index.php?rnd=<?=rand(0,9999)?>&username=<?=$faxUsername?>&password=<?=$faxPassword?>" width="100%" height="650" scrolling="auto" border="1" frameborder="0" framespacing="0"></iframe>
    </div>
  <?
  $contents=ob_get_contents();
  ob_end_clean();
  //================ SIDEBAR ================
  ob_start();
  ?>
    <div class="Sidebar">
      <h1><?=T_("Informations")?></h1>
    </div>
  <?
  $sidebar=ob_get_contents();
  ob_end_clean();
  //================ SETTINGS ================
  $smarty->assign("section", "fax");
  $smarty->assign("subsection", "");
  $smarty->assign("templateType", "OneCol");  //OneCol, TwoColLeft, TwoColRight
  $smarty->assign("contents", $contents);
  $smarty->assign("sidebar", $sidebar);
  $smarty->display('main.tpl');
?>