Exemplo n.º 1
0
<fieldset>
<legend class="texto_adm_negrita">Mantención de Regiones </legend>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">ID</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">NOMBRE</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">SIGLA</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">PAIS</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">ELIMINAR</th>
    <th bgcolor="#CCCCCC" class="texto_adm_negrita" scope="col">MODIFICAR</th>
  </tr>
	  
  <?php 
include_once '../controller/class_region.php';
$empresa = new region();
$r = $empresa->getRegion();
while ($f = mysql_fetch_object($r)) {
    ?>
	<tr>
    <td class="texto_adm"><?php 
    echo $f->id;
    ?>
</td>
    <td class="texto_adm"><?php 
    echo $f->nombre;
    ?>
</td>
    <td class="texto_adm"><?php 
    echo $f->sigla;
    ?>
</td>
Exemplo n.º 2
0
 function ManualRegionPositionForm()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $regionid = Kit::GetParam('regionid', _GET, _STRING);
     $layoutid = Kit::GetParam('layoutid', _GET, _INT);
     $scale = Kit::GetParam('scale', _GET, _DOUBLE);
     $zoom = Kit::GetParam('zoom', _GET, _DOUBLE);
     // Load the region and get the dimensions, applying the scale factor if necessary (only v1 layouts will have a scale factor != 1)
     $region = new region($db);
     $regionNode = $region->getRegion($layoutid, $regionid);
     $top = round($regionNode->getAttribute('top') * $scale, 0);
     $left = round($regionNode->getAttribute('left') * $scale, 0);
     $width = round($regionNode->getAttribute('width') * $scale, 0);
     $height = round($regionNode->getAttribute('height') * $scale, 0);
     $zindex = $regionNode->getAttribute('zindex');
     $ownerId = $region->GetOwnerId($layoutid, $regionid);
     $regionName = $regionNode->getAttribute('name');
     $regionAuth = $this->user->RegionAssignmentAuth($ownerId, $layoutid, $regionid, true);
     if (!$regionAuth->edit) {
         trigger_error(__('You do not have permissions to edit this region'), E_USER_ERROR);
     }
     // Set some information about the form
     Theme::Set('form_id', 'RegionProperties');
     Theme::Set('form_action', 'index.php?p=timeline&q=ManualRegionPosition');
     Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $layoutid . '"><input type="hidden" name="regionid" value="' . $regionid . '"><input type="hidden" name="scale" value="' . $scale . '"><input type="hidden" name="zoom" value="' . $zoom . '">');
     $formFields = array();
     $formFields[] = FormManager::AddText('name', __('Name'), $regionName, __('Name of the Region'), 'n', 'maxlength="50"');
     $formFields[] = FormManager::AddNumber('top', __('Top'), $top, __('Offset from the Top Corner'), 't');
     $formFields[] = FormManager::AddNumber('left', __('Left'), $left, __('Offset from the Left Corner'), 'l');
     $formFields[] = FormManager::AddNumber('width', __('Width'), $width, __('Width of the Region'), 'w');
     $formFields[] = FormManager::AddNumber('height', __('Height'), $height, __('Height of the Region'), 'h');
     // Transitions
     if (count($this->user->TransitionAuth('out')) > 0) {
         // Add none to the list
         $transitions = $this->user->TransitionAuth('out');
         $transitions[] = array('code' => '', 'transition' => 'None', 'class' => '');
         $formFields[] = FormManager::AddCombo('transitionType', __('Exit Transition'), $region->GetOption($layoutid, $regionid, 'transOut', ''), $transitions, 'code', 'transition', __('What transition should be applied when this region is finished?'), 't');
         $formFields[] = FormManager::AddNumber('transitionDuration', __('Duration'), $region->GetOption($layoutid, $regionid, 'transOutDuration', 0), __('The duration for this transition, in milliseconds.'), 'l', '', 'transition-group');
         // Compass points for direction
         $compassPoints = array(array('id' => 'N', 'name' => __('North')), array('id' => 'NE', 'name' => __('North East')), array('id' => 'E', 'name' => __('East')), array('id' => 'SE', 'name' => __('South East')), array('id' => 'S', 'name' => __('South')), array('id' => 'SW', 'name' => __('South West')), array('id' => 'W', 'name' => __('West')), array('id' => 'NW', 'name' => __('North West')));
         $formFields[] = FormManager::AddCombo('transitionDirection', __('Direction'), $region->GetOption($layoutid, $regionid, 'transOutDirection', ''), $compassPoints, 'id', 'name', __('The direction for this transition. Only appropriate for transitions that move, such as Fly.'), 'd', 'transition-group transition-direction');
         // Add some dependencies
         $response->AddFieldAction('transitionType', 'init', '', array('.transition-group' => array('display' => 'none')));
         $response->AddFieldAction('transitionType', 'init', '', array('.transition-group' => array('display' => 'block')), 'not');
         $response->AddFieldAction('transitionType', 'change', '', array('.transition-group' => array('display' => 'none')));
         $response->AddFieldAction('transitionType', 'change', '', array('.transition-group' => array('display' => 'block')), 'not');
     }
     $formFields[] = FormManager::AddCheckbox('loop', __('Loop?'), $region->GetOption($layoutid, $regionid, 'loop', 0), __('If there is only one item in this region should it loop? Not currently available for Windows Players.'), 'l');
     $formFields[] = FormManager::AddNumber('zindex', __('Layer'), $zindex == 0 ? NULL : $zindex, __('The layering order of this region (z-index). Advanced use only. '), 'z');
     Theme::Set('form_fields', $formFields);
     // Add some information about the whole layout to this request.
     $layout = new Layout();
     $layoutInformation = $layout->LayoutInformation($layoutid);
     $response->extra['layoutInformation'] = array('width' => $layoutInformation['width'], 'height' => $layoutInformation['height']);
     $response->SetFormRequestResponse(NULL, __('Region Options'), '350px', '275px');
     $response->AddButton(__('Cancel'), 'XiboDialogClose()');
     $response->AddButton(__('Save'), '$("#RegionProperties").submit()');
     $response->AddButton(__('Set Full Screen'), 'setFullScreenLayout()');
     $response->Respond();
 }