AND (promo_min = 0 OR promo_min <= {?})
AND (promo_max = 0 OR promo_max >= {?})
AND (priorite >= {?})
+ AND (state = 'active')
$exclude
ORDER BY RAND()
LIMIT 1",
$table_editor->describe('promo_min', 'promo. min (0 aucune)', false);
$table_editor->describe('promo_max', 'promo. max (0 aucune)', false);
$table_editor->describe('titre', 'titre', true);
+ $table_editor->describe('state', 'actif', true);
$table_editor->describe('text', 'texte (html) de l\'astuce', false);
$table_editor->describe('priorite', 'priorité (0=min, 256=max)', false);
$table_editor->apply($page, $action, $id);
{/if}
{if $myval.Type eq 'timestamp'}
<span class="smaller">{$myrow.$myfield|date_format:"%x %X"}</span>
+ {elseif $myval.Type eq 'checkbox'}
+ <input type="checkbox" disabled="disabled"{if $myrow.$myfield} checked="checked"{/if}/>
{else}
{$myrow.$myfield}
{/if}
</select>
{elseif ($myval.Type eq 'textarea') or ($myval.Type eq 'varchar200')}
<textarea name="{$myfield}" rows="{if $myval.Type eq 'varchar200'}3{else}10{/if}" cols="70">{$entry.$myfield}</textarea>
+ {elseif ($myval.Type eq 'checkbox')}
+ <input type="checkbox" name="{$myfield}" value="{$myval.Value}"{if $entry.$myfield} checked="checked"{/if}/>
{else}
<input type="text" name="{$myfield}" value="{$entry.$myfield}" {if $myval.Size}size="{$myval.Size}" maxlength="{$myval.Maxlength}"{/if}/>
{if $myval.Type eq 'timestamp'}<em>jj/mm/aaaa hh:mm:ss</em>{/if}
peremption date not null default '0000-00-00',
promo_min smallint(4) unsigned not null default 0,
promo_max smallint(4) unsigned not null default 0,
+ active set('active') not null default 'active',
primary key (id)
);