is_valid($numero)) { $query = 'SELECT * FROM '.ECARD_TABLE.' WHERE numero = "'.$numero.'";'; $result = pwg_query($query); $tableau = mysql_fetch_assoc($result); if (isset($tableau['numero'])) { // Recover img infos. $query = 'SELECT DISTINCT * FROM ' . IMAGES_TABLE.' AS img' .' WHERE img.id = '.$tableau['image'].';'; $result = pwg_query($query); $row = mysql_fetch_assoc($result); set_make_full_url(); $url = duplicate_picture_url( array( 'image_id' => $row['id'], 'image_file' => $row['file'] ), array('start') ); unset_make_full_url(); /* foreach ($tableau as $i => $v) echo '['.$i.']='.$v."\n"; echo "id=".$row['id']; echo "file=".$row['file']; */ // Envoi de la page $template->assign( 'ecard', array( 'sujet' => $tableau['sujet'], 'img' => $tableau['image'], 'message' => $tableau['message'], 'url' => $url, 'name' => $row['name'], 'thumb' => get_thumbnail_url($row), 'img' => get_image_url($row), 'adrexp' => $tableau['adrexp'], 'nomexp' => $tableau['nomexp'], 'title' => $me->my_config['ecard_showinfos'] ? $row['name'] : null, 'author' => $me->my_config['ecard_showinfos'] ? $row['author'] : null )); } $template->assign(array( 'TITLE' => "ecard : ".$tableau['sujet'])); } $template->set_filenames(array('ecard_result' => ECARD_ROOT.'/template/publish.tpl')); $template->concat('PLUGIN_INDEX_CONTENT_BEGIN', $template->parse('ecard_result', true)); $template->assign('PLUGIN_INDEX_ACTIONS' , '