Forum PHPBoost

   Le 02/07/12 à 23h43 Citer      

Administrateur

Chef de projet
Développement Noyau

Sexe:
Inscrit le: 27/02/09
Messages: 9632
Lieu: Alsace
Reprise du message précédent

Tu as choisi quelle solution ?

pm http://www.phpboost.com    
   Le 03/07/12 à 12h57 Citer      

Booster Minigun

Groupe: Membre

Sexe:
Inscrit le: 14/06/12
Messages: 30
Lieu: Proche de Toulo...
Dans mon php :
 
$Template->assign_block_vars('edit', array(
        'KERNEL_EDITOR' => display_editor(),
 
Dans mon tpl :
 
{edit.KERNEL_EDITOR}

pm    
   Le 03/07/12 à 13h17 Citer      

Administrateur

Chef de projet
Développement Noyau

Sexe:
Inscrit le: 27/02/09
Messages: 9632
Lieu: Alsace
Colles les deux fichiers en question ici stp.

pm http://www.phpboost.com    
   Le 03/07/12 à 18h44 Citer      

Booster Minigun

Groupe: Membre

Sexe:
Inscrit le: 14/06/12
Messages: 30
Lieu: Proche de Toulo...
PHP :
Code PHP :
  1. if (!empty($_POST['update']) && !empty($id_post)) // Mise a jour du contenu
  2. {
  3. $idtab = retrieve(POST, 'tab', 0);
  4. $idlicence = retrieve(POST, 'licence', 0);
  5. $content = retrieve(POST, 'content', '', TSTRING_PARSE);
  6.  
  7. //On met à jour
  8. if (!empty($content))
  9. {
  10. $Sql->query_inject("UPDATE " . PREFIX . "tab_content SET idtab = '" . $idtab . "', idlicence = '" . $idlicence . "', contents = '" . $content . "'
  11. WHERE id = '" . $id_post . "'", __LINE__, __FILE__);
  12.  
  13. redirect(HOST . SCRIPT);
  14. }
  15. else
  16. redirect(HOST . DIR . '/tab/admin_tab_content.php?id= ' . $id_post . '&error=incomplete#errorh');
  17. }
  18. elseif (!empty($id)) // Affichage de l'édition
  19. {
  20. $Template->set_filenames(array(
  21. 'admin_tab_content_management'=> 'tab/admin_tab_content_management.tpl'
  22. ));
  23.  
  24. $row = $Sql->query_array(PREFIX . 'tab_content', '*', "WHERE id = '" . $id . "'", __LINE__, __FILE__);
  25.  
  26. $Template->assign_block_vars('edit', array(
  27. 'KERNEL_EDITOR' => display_editor(),
  28. 'TOKEN' => $Session->get_token(),
  29. 'CONTENT' => $row['contents'],
  30. 'IDCONTENT' => $row['id']
  31. ));
  32.  
  33. $idlicence = $row['idlicence'];
  34. $idtab = $row['idtab'];
  35.  
  36. //Permis
  37. $i = 0;
  38. $result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab_licence", __LINE__, __FILE__);
  39. while ($row = $Sql->fetch_assoc($result))
  40. {
  41. $selected = ($row['id'] == $idlicence) ? 'selected="selected"' : '';
  42. $Template->assign_block_vars('edit.select', array(
  43. 'LICENCE' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
  44. ));
  45. $i++;
  46. }
  47. $Sql->query_close($result);
  48.  
  49. //Gestion erreur.
  50. $get_error = retrieve(GET, 'error', '');
  51. if ($get_error == 'incomplete')
  52. $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
  53. elseif ($i == 0) //Aucune catégorie => alerte.
  54. $Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
  55.  
  56. //Onglet
  57. $i = 0;
  58. $result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab", __LINE__, __FILE__);
  59. while ($row = $Sql->fetch_assoc($result))
  60. {
  61. $selected = ($row['id'] == $idtab) ? 'selected="selected"' : '';
  62. $Template->assign_block_vars('edit.select', array(
  63. 'TAB' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
  64. ));
  65. $i++;
  66. }
  67. $Sql->query_close($result);
  68.  
  69. //Gestion erreur.
  70. $get_error = retrieve(GET, 'error', '');
  71. if ($get_error == 'incomplete')
  72. $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
  73. elseif ($i == 0) //Aucune catégorie => alerte.
  74. $Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
  75.  
  76. $Template->assign_vars(array(
  77. 'L_REQUIRE_LICENCE' => $LANG['require_title'],
  78. 'L_REQUIRE_PAGE' => $LANG['require_cat'],
  79. 'L_LICENCE_MANAGEMENT' => $LANG['tab_management'],
  80. 'L_ADD_LICENCE' => $LANG['add_tab'],
  81. 'L_EDIT_TAB' => $LANG['edit_tab'],
  82. 'L_REQUIRE' => $LANG['require'],
  83. 'L_LICENCE' => $LANG['title'],
  84. 'L_PAGE' => $LANG['category'],
  85. 'L_UPDATE' => $LANG['update'],
  86. 'L_RESET' => $LANG['reset']
  87. ));
  88.  
  89. $Template->pparse('admin_tab_content_management');
  90. }
  91. else // Affichage de base
  92. {
  93. $Template->set_filenames(array(
  94. 'admin_tab_content_management'=> 'tab/admin_tab_content_management.tpl'
  95. ));
  96.  
  97. $Template->assign_vars(array(
  98. 'L_UNTIL' => $LANG['until'],
  99. 'L_REQUIRE_TITLE' => $LANG['require_title'],
  100. 'L_REQUIRE_TEXT' => $LANG['require_text'],
  101. 'L_REQUIRE_CAT' => $LANG['require_cat'],
  102. 'L_TAB_MANAGEMENT' => $LANG['tab_management'],
  103. 'L_ADD_TAB' => $LANG['add_tab'],
  104. 'L_CAT_TAB' => $LANG['category_tab'],
  105. 'L_EDIT_TAB' => $LANG['edit_tab'],
  106. 'L_REQUIRE' => $LANG['require'],
  107. 'L_TITLE' => $LANG['title'],
  108. 'L_CATEGORY' => $LANG['category'],
  109. 'L_TEXT' => $LANG['content'],
  110. 'L_UPDATE' => $LANG['update'],
  111. 'L_RESET' => $LANG['reset']
  112. ));
  113.  
  114. $Template->assign_block_vars('list', array(
  115. 'KERNEL_EDITOR' => display_editor()
  116. ));
  117.  
  118. $result = $Sql->query_while("SELECT tl.name licence, tc.id, tp.name page, tt.name tab
  119. FROM " . PREFIX . "tab_content tc
  120. LEFT JOIN " . PREFIX . "tab tt ON tt.id = tc.idtab
  121. LEFT JOIN " . PREFIX . "tab_licence tl ON tl.id = tc.idlicence
  122. LEFT JOIN " . PREFIX . "tab_page tp ON tp.id = tl.idpage
  123. ORDER by tp.id ASC" , __LINE__, __FILE__);
  124. while ($row = $Sql->fetch_assoc($result))
  125. {
  126. $Template->assign_block_vars('list.content', array(
  127. 'LICENCE' => $row['licence'],
  128. 'TAB' => $row['tab'],
  129. 'IDCONTENT' => $row['id'],
  130. 'PAGE' => $row['page']
  131. ));
  132. }
  133. $Sql->query_close($result);
  134.  
  135. //Permis
  136. $i = 0;
  137. $result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab_licence", __LINE__, __FILE__);
  138. while ($row = $Sql->fetch_assoc($result))
  139. {
  140. $selected = ($row['id'] == 1) ? 'selected="selected"' : '';
  141. $Template->assign_block_vars('select', array(
  142. 'LICENCE' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
  143. ));
  144. $i++;
  145. }
  146. $Sql->query_close($result);
  147.  
  148. //Gestion erreur.
  149. $get_error = retrieve(GET, 'error', '');
  150. if ($get_error == 'incomplete')
  151. $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
  152. elseif ($i == 0) //Aucune catégorie => alerte.
  153. $Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
  154.  
  155. //Titre onglet
  156. $i = 0;
  157. $result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab", __LINE__, __FILE__);
  158. while ($row = $Sql->fetch_assoc($result))
  159. {
  160. $selected = ($row['id'] == 1) ? 'selected="selected"' : '';
  161. $Template->assign_block_vars('select', array(
  162. 'TAB' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
  163. ));
  164. $i++;
  165. }
  166. $Sql->query_close($result);
  167.  
  168. //Gestion erreur.
  169. $get_error = retrieve(GET, 'error', '');
  170. if ($get_error == 'incomplete')
  171. $Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
  172. elseif ($i == 0) //Aucune catégorie => alerte.
  173. $Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
  174.  
  175. $Template->pparse('admin_tab_content_management');
  176. }

pm    
   Le 03/07/12 à 18h45 Citer      

Booster Minigun

Groupe: Membre

Sexe:
Inscrit le: 14/06/12
Messages: 30
Lieu: Proche de Toulo...
TPL :
Code TEMPLATE :
  1. <div id="admin_contents">
  2. # START list #
  3. <script type="text/javascript">
  4. <!--
  5. function check_form(){
  6. # IF C_BBCODE_TINYMCE_MODE #
  7. tinyMCE.triggerSave();
  8. # ENDIF #
  9.  
  10. if(document.getElementById('content').value == "") {
  11. alert("Il faut mettre un contenu");
  12. return false;
  13. }
  14.  
  15. return true;
  16. }
  17.  
  18. function Confirm() {
  19. return confirm("Supprimer le contenu ?");
  20. }
  21. -->
  22. </script>
  23. <table class="module_table">
  24. <tr style="text-align:center;">
  25. <th>
  26. Titre de l'onglet
  27. </th>
  28. <th>
  29. Permis
  30. </th>
  31. <th>
  32. Page
  33. </th>
  34. <th>
  35. {L_UPDATE}
  36. </th>
  37. <th>
  38. Supprimer
  39. </th>
  40. </tr>
  41.  
  42. # START list.content #
  43. <tr style="text-align:center;">
  44. <td class="row2">
  45. {list.content.TAB}
  46. </td>
  47. <td class="row2">
  48. {list.content.LICENCE}
  49. </td>
  50. <td class="row2">
  51. {list.content.PAGE}
  52. </td>
  53. <td class="row2">
  54. <a href="admin_tab_content.php?id={list.content.IDCONTENT}"><img src="../templates/{THEME}/images/{LANG}/edit.png" alt="{L_UPDATE}" title="{L_UPDATE}" /></a>
  55. </td>
  56. <td class="row2">
  57. <a href="admin_tab_content.php?delete=true&id={list.content.IDCONTENT}&token={TOKEN}" onclick="javascript:return Confirm();"><img src="../templates/{THEME}/images/{LANG}/delete.png" alt="{L_DELETE}" title="{L_DELETE}" /></a>
  58. </td>
  59. </tr>
  60. # END list.content #
  61. </table>
  62.  
  63. <br /><br />
  64.  
  65. <!-- Ajout d'un contenu -->
  66. <form action="admin_tab_content.php?token={TOKEN}" name="form" method="post" style="margin:auto;" onsubmit="return check_form();" class="fieldset_content">
  67. <legend>Ajout d'un contenu</legend>
  68. <p>{L_REQUIRE}</p>
  69. <dl>
  70. <dt><label for="licence">* Permis</label></dt>
  71. <dd><label>
  72. <select id="licence" name="licence">
  73. # START select #
  74. {select.LICENCE}
  75. # END select #
  76. </select>
  77. </label></dd>
  78. </dl>
  79. <dl>
  80. <dt><label for="tab">* Onglet</label></dt>
  81. <dd><label>
  82. <select id="tab" name="tab">
  83. # START select #
  84. {select.TAB}
  85. # END select #
  86. </select>
  87. </label></dd>
  88. </dl>
  89. <label for="content">* {L_TEXT}</label>
  90. {list.KERNEL_EDITOR}
  91. <label><textarea rows="20" cols="86" id="content" name="content"></textarea></label>
  92. <br /><br />
  93.  
  94. <fieldset class="fieldset_submit">
  95. <legend>Ajouter</legend>
  96. <input type="submit" name="valid" value="Ajouter" class="submit" />
  97.   
  98. <input type="reset" value="{L_RESET}" class="reset" />
  99. </form>
  100. # END list #
  101.  
  102. # START edit #
  103. <script type="text/javascript">
  104. <!--
  105. var theme = '{THEME}';
  106. -->
  107. </script>
  108. <script type="text/javascript">
  109. <!--
  110. function check_form(){
  111. # IF C_BBCODE_TINYMCE_MODE #
  112. tinyMCE.triggerSave();
  113. # ENDIF #
  114.  
  115. if(document.getElementById('content').value == "") {
  116. alert("Il faut mettre un contenu");
  117. return false;
  118. }
  119. return true;
  120. }
  121. -->
  122. </script>
  123.  
  124. <form action="admin_tab_content.php?token={TOKEN}" name="form" method="post" style="margin:auto;" onsubmit="return check_form();" class="fieldset_content">
  125. <legend>Editer un contenu</legend>
  126. <p>{L_REQUIRE}</p>
  127. <dl>
  128. <dt><label for="licence">* Permis</label></dt>
  129. <dd><label>
  130. <select id="licence" name="licence">
  131. # START edit.select #
  132. {select.LICENCE}
  133. # END edit.select #
  134. </select>
  135. </label></dd>
  136. </dl>
  137. <dl>
  138. <dt><label for="tab">* Onglet</label></dt>
  139. <dd><label>
  140. <select id="tab" name="tab">
  141. # START edit.select #
  142. {select.TAB}
  143. # END edit.select #
  144. </select>
  145. </label></dd>
  146. </dl>
  147. <label for="content">* {L_TEXT}</label>
  148. {edit.KERNEL_EDITOR}
  149. <label><textarea rows="20" cols="86" id="content" name="content">{edit.CONTENT}</textarea></label>
  150. <br /><br />
  151.  
  152. <fieldset class="fieldset_submit">
  153. <legend>{L_UPDATE}</legend>
  154. <input type="hidden" name="id" value="{edit.IDCONTENT}" class="submit" />
  155. <input type="submit" name="update" value="{L_UPDATE}" class="submit" />
  156. </form>
  157. # END edit #
  158. </div>

pm    
   Le 03/07/12 à 20h40 Citer      

Administrateur

Chef de projet
Développement Noyau

Sexe:
Inscrit le: 27/02/09
Messages: 9632
Lieu: Alsace
Ok et c'est dans quel cadre que tu souhaites afficher l'éditeur BBCode ? L'édition, l'ajout ?

pm http://www.phpboost.com    
   Le 03/07/12 à 20h56 Citer      

Booster Minigun

Groupe: Membre

Sexe:
Inscrit le: 14/06/12
Messages: 30
Lieu: Proche de Toulo...
Oui c'est ça.
Quand j'ajoute un contenu ou quand je veux en éditer un.
J'ai besoin des puces, des retours chario, et comme ce n'est pas moi qui vais par la suite administrer le site et que le contenu va bouger....

pm    
   Le 04/07/12 à 14h52 Citer      

Administrateur

Chef de projet
Développement Noyau

Sexe:
Inscrit le: 27/02/09
Messages: 9632
Lieu: Alsace
Code PHP :
 
$Template->set_filenames(array(
		'admin_tab_content_management'=> 'tab/admin_tab_content_management.tpl'
));
 
if (!empty($_POST['update']) && !empty($id_post)) // Mise a jour du contenu
{
	$idtab = retrieve(POST, 'tab', 0);
	$idlicence = retrieve(POST, 'licence', 0);
	$content = retrieve(POST, 'content', '', TSTRING_PARSE);
 
	//On met à jour
	if (!empty($content))
	{
		$Sql->query_inject("UPDATE " . PREFIX . "tab_content SET idtab = '" . $idtab . "', idlicence = '" . $idlicence . "', contents = '" . $content . "'
		WHERE id = '" . $id_post . "'", __LINE__, __FILE__);	
 
		redirect(HOST . SCRIPT);
	}
	else
	redirect(HOST . DIR . '/tab/admin_tab_content.php?id= ' . $id_post . '&error=incomplete#errorh');
}
elseif (!empty($id)) // Affichage de l'édition
{ 
	$row = $Sql->query_array(PREFIX . 'tab_content', '*', "WHERE id = '" . $id . "'", __LINE__, __FILE__);
 
	$Template->assign_block_vars('edit', array(
		'TOKEN' => $Session->get_token(),
		'CONTENT' => $row['contents'],
		'IDCONTENT' => $row['id']
	));
 
	$idlicence = $row['idlicence'];
	$idtab = $row['idtab'];
 
	//Permis
	$i = 0;
	$result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab_licence", __LINE__, __FILE__);
	while ($row = $Sql->fetch_assoc($result))
	{
		$selected = ($row['id'] == $idlicence) ? 'selected="selected"' : '';
		$Template->assign_block_vars('edit.select', array(
			'LICENCE' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
		));
		$i++;
	}
	$Sql->query_close($result);
 
	//Gestion erreur.
	$get_error = retrieve(GET, 'error', '');
	if ($get_error == 'incomplete')
		$Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
	elseif ($i == 0) //Aucune catégorie => alerte.
		$Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
 
	//Onglet
	$i = 0;
	$result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab", __LINE__, __FILE__);
	while ($row = $Sql->fetch_assoc($result))
	{
		$selected = ($row['id'] == $idtab) ? 'selected="selected"' : '';
		$Template->assign_block_vars('edit.select', array(
			'TAB' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
		));
		$i++;
	}
	$Sql->query_close($result);
 
	//Gestion erreur.
	$get_error = retrieve(GET, 'error', '');
	if ($get_error == 'incomplete')
		$Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
	elseif ($i == 0) //Aucune catégorie => alerte.
		$Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
 
	$Template->assign_vars(array(
		'L_REQUIRE_LICENCE' => $LANG['require_title'],
		'L_REQUIRE_PAGE' => $LANG['require_cat'],
		'L_LICENCE_MANAGEMENT' => $LANG['tab_management'],
		'L_ADD_LICENCE' => $LANG['add_tab'],	
		'L_EDIT_TAB' => $LANG['edit_tab'],
		'L_REQUIRE' => $LANG['require'],
		'L_LICENCE' => $LANG['title'],
		'L_PAGE' => $LANG['category'],
		'L_UPDATE' => $LANG['update'],
		'L_RESET' => $LANG['reset']
	));	
}
else // Affichage de base
{ 
	$Template->assign_vars(array(
		'L_UNTIL' => $LANG['until'],
		'L_REQUIRE_TITLE' => $LANG['require_title'],
		'L_REQUIRE_TEXT' => $LANG['require_text'],
		'L_REQUIRE_CAT' => $LANG['require_cat'],
		'L_TAB_MANAGEMENT' => $LANG['tab_management'],
		'L_ADD_TAB' => $LANG['add_tab'],
		'L_CAT_TAB' => $LANG['category_tab'],
		'L_EDIT_TAB' => $LANG['edit_tab'],
		'L_REQUIRE' => $LANG['require'],
		'L_TITLE' => $LANG['title'],
		'L_CATEGORY' => $LANG['category'],
		'L_TEXT' => $LANG['content'],
		'L_UPDATE' => $LANG['update'],
		'L_RESET' => $LANG['reset']
	));
 
	$result = $Sql->query_while("SELECT tl.name licence, tc.id, tp.name page, tt.name tab
			FROM " . PREFIX . "tab_content tc
			LEFT JOIN " . PREFIX . "tab tt ON tt.id = tc.idtab 
			LEFT JOIN " . PREFIX . "tab_licence tl ON tl.id = tc.idlicence 
			LEFT JOIN " . PREFIX . "tab_page tp ON tp.id = tl.idpage 
			ORDER by tp.id ASC" , __LINE__, __FILE__);
	while ($row = $Sql->fetch_assoc($result))
	{
		$Template->assign_block_vars('list.content', array(
			'LICENCE' => $row['licence'],
			'TAB' => $row['tab'],
			'IDCONTENT' => $row['id'],
			'PAGE' => $row['page']
		));
	}
	$Sql->query_close($result);
 
	//Permis
	$i = 0;
	$result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab_licence", __LINE__, __FILE__);
	while ($row = $Sql->fetch_assoc($result))
	{
		$selected = ($row['id'] == 1) ? 'selected="selected"' : '';
		$Template->assign_block_vars('select', array(
		'LICENCE' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
		));
		$i++;
	}
	$Sql->query_close($result);
 
	//Gestion erreur.
	$get_error = retrieve(GET, 'error', '');
	if ($get_error == 'incomplete')
		$Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
	elseif ($i == 0) //Aucune catégorie => alerte.
		$Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
 
	//Titre onglet
	$i = 0;
	$result = $Sql->query_while("SELECT * FROM " . PREFIX . "tab", __LINE__, __FILE__);
	while ($row = $Sql->fetch_assoc($result))
	{
		$selected = ($row['id'] == 1) ? 'selected="selected"' : '';
		$Template->assign_block_vars('select', array(
		'TAB' => '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>'
		));
		$i++;
	}
	$Sql->query_close($result);
 
	//Gestion erreur.
	$get_error = retrieve(GET, 'error', '');
	if ($get_error == 'incomplete')
		$Errorh->handler($LANG['e_incomplete'], E_USER_NOTICE);
	elseif ($i == 0) //Aucune catégorie => alerte.
		$Errorh->handler($LANG['require_cat_create'], E_USER_WARNING);
}
 
$Template->assign_vars(array(
	'KERNEL_EDITOR' => display_editor()
));
 
$Template->pparse('admin_tab_content_management');


Code TPL :
<div id="admin_contents">
			# START list #
			<script type="text/javascript">
			<!--
			function check_form(){
				# IF C_BBCODE_TINYMCE_MODE #
					tinyMCE.triggerSave();
				# ENDIF #
 
				if(document.getElementById('content').value == "") {
					alert("Il faut mettre un contenu");
					return false;
				}
 
				return true;
			}
 
			function Confirm() {
				return confirm("Supprimer le contenu ?");
			}
			-->
			</script>
			<table class="module_table">
				<tr style="text-align:center;">
					<th>
						Titre de l'onglet
					</th>
					<th>
						Permis
					</th>
					<th>
						Page
					</th>
					<th>
						{L_UPDATE}
					</th>
					<th>
						Supprimer
					</th>
				</tr>
 
				# START list.content #
				<tr style="text-align:center;"> 
					<td class="row2"> 
						{list.content.TAB}
					</td>
					<td class="row2"> 
						{list.content.LICENCE}
					</td>
					<td class="row2"> 
						{list.content.PAGE}
					</td>
					<td class="row2"> 
						<a href="admin_tab_content.php?id={list.content.IDCONTENT}"><img src="../templates/{THEME}/images/{LANG}/edit.png" alt="{L_UPDATE}" title="{L_UPDATE}" /></a>
					</td>
					<td class="row2">
						<a href="admin_tab_content.php?delete=true&id={list.content.IDCONTENT}&token={TOKEN}" onclick="javascript:return Confirm();"><img src="../templates/{THEME}/images/{LANG}/delete.png" alt="{L_DELETE}" title="{L_DELETE}" /></a>
					</td>
				</tr>
				# END list.content #
			</table>
 
			<br /><br />			
 
			<!-- Ajout d'un contenu -->
			<form action="admin_tab_content.php?token={TOKEN}" name="form" method="post" style="margin:auto;" onsubmit="return check_form();" class="fieldset_content">
				<fieldset>
					<legend>Ajout d'un contenu</legend>
					<p>{L_REQUIRE}</p>
					<dl>
						<dt><label for="licence">* Permis</label></dt>
						<dd><label>
							<select id="licence" name="licence">				
							# START select #				
								{select.LICENCE}				
							# END select #				
							</select>
						</label></dd>
					</dl>
					<dl>
						<dt><label for="tab">* Onglet</label></dt>
						<dd><label>
							<select id="tab" name="tab">				
							# START select #				
								{select.TAB}				
							# END select #				
							</select>
						</label></dd>
					</dl>
					<label for="content">* {L_TEXT}</label>
						{KERNEL_EDITOR}
						<label><textarea rows="20" cols="86" id="content" name="content"></textarea></label>
						<br /><br />
				</fieldset>	
 
				<fieldset class="fieldset_submit">
					<legend>Ajouter</legend>
					<input type="submit" name="valid" value="Ajouter" class="submit" />
 
					<input type="reset" value="{L_RESET}" class="reset" />				
				</fieldset>	
			</form>	
			# END list #
 
			# START edit #
			<script type="text/javascript">
			<!--
				var theme = '{THEME}';
			-->
			</script>
			<script type="text/javascript">
			<!--
			function check_form(){
				# IF C_BBCODE_TINYMCE_MODE #
				tinyMCE.triggerSave();
				# ENDIF #
 
				if(document.getElementById('content').value == "") {
					alert("Il faut mettre un contenu");
					return false;
				}
				return true;
			}
			-->
			</script>
 
				<form action="admin_tab_content.php?token={TOKEN}" name="form" method="post" style="margin:auto;" onsubmit="return check_form();" class="fieldset_content">
					<fieldset>
						<legend>Editer un contenu</legend>
						<p>{L_REQUIRE}</p>
						<dl>
						<dt><label for="licence">* Permis</label></dt>
						<dd><label>
							<select id="licence" name="licence">				
							# START edit.select #				
								{select.LICENCE}				
							# END edit.select #				
							</select>
						</label></dd>
					</dl>
					<dl>
						<dt><label for="tab">* Onglet</label></dt>
						<dd><label>
							<select id="tab" name="tab">				
							# START edit.select #				
								{select.TAB}				
							# END edit.select #				
							</select>
						</label></dd>
					</dl>
					<label for="content">* {L_TEXT}</label>
						{KERNEL_EDITOR}
						<label><textarea rows="20" cols="86" id="content" name="content">{edit.CONTENT}</textarea></label>
						<br /><br />
				</fieldset>						
 
					<fieldset class="fieldset_submit">
						<legend>{L_UPDATE}</legend>
						<input type="hidden" name="id" value="{edit.IDCONTENT}" class="submit" />
						<input type="submit" name="update" value="{L_UPDATE}" class="submit" />
					</fieldset>	
				</form>
			# END edit #
		</div>

pm http://www.phpboost.com    
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie
Annonces