do {
$priority = (int)($priority/2);
$res = XDB::query("SELECT *
- FROM tips
+ FROM reminder_tips
WHERE (expiration = '0000-00-00' OR expiration > CURDATE())
AND (promo_min = 0 OR promo_min <= {?})
AND (promo_max = 0 OR promo_max >= {?})
- AND (priorite >= {?})
+ AND (priority >= {?})
AND (state = 'active')
$exclude
ORDER BY RAND()
{
$page->setTitle('Administration - Astuces');
$page->assign('title', 'Gestion des Astuces');
- $table_editor = new PLTableEditor('admin/tips', 'tips', 'id');
+ $table_editor = new PLTableEditor('admin/tips', 'reminder_tips', 'id');
$table_editor->describe('expiration', 'date de péremption', true);
$table_editor->describe('promo_min', 'promo. min (0 aucune)', false);
$table_editor->describe('promo_max', 'promo. max (0 aucune)', false);
<fieldset id="tod">
{/if}
<legend>{icon name=lightbulb} {if !$tips.special}
- Astuce : {$tips.titre}
+ Astuce : {$tips.title}
{if hasPerm('admin') && !$tips.special && !$nochange}
<a href="admin/tips/edit/{$tips.id}">{icon name="page_edit" title="Editer"}</a>
{/if}
# announces
ALTER TABLE announces
-CHANGE COLUMN user_id uid INT(11) not null;
+CHANGE COLUMN user_id uid INT(11) not null,
CHANGE COLUMN peremption expiration DATE NOT NULL;
+
ALTER TABLE announce_read
CHANGE COLUMN user_id uid INT(11) not null;
- ALTER TABLE tips
-CHANGE COLUMN peremption expiration DATE NOT NULL;
+
+ ALTER TABLE reminder_tips
+CHANGE COLUMN peremption expiration DATE NOT NULL,
+CHANGE COLUMN titre title VARCHAR(64) NOT NULL,
+CHANGE COLUMN priorite priority TINYINT(2) UNSIGNED NOT NULL DEFAULT 127;
# profile
ALTER TABLE profile_photos
copyTable '#x4dat#.search_name' 'search_name'
copyTable '#x4dat#.skins' 'skins'
-copyTable '#x4dat#.tips' 'tips'
+copyTable '#x4dat#.tips' 'reminder_tips'
copyTable '#x4dat#.survey_surveys' 'surveys'
copyTable '#x4dat#.survey_answers' 'survey_answers'