PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/administrator/components/com_breezingforms/admin/integrator.html.php

https://bitbucket.org/izubizarreta/https-bitbucket.org-bityvip-alpes
PHP | 630 lines | 551 code | 71 blank | 8 comment | 46 complexity | 863f589b090aee3cc396c00a863f3269 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, MIT, LGPL-3.0, LGPL-2.0, JSON
  1. <?php
  2. /**
  3. * BreezingForms - A Joomla Forms Application
  4. * @version 1.8
  5. * @package BreezingForms
  6. * @copyright (C) 2008-2012 by Markus Bopp
  7. * @license Released under the terms of the GNU General Public License
  8. **/
  9. defined('_JEXEC') or die('Direct Access to this location is not allowed.');
  10. class BFIntegratorHtml{
  11. public static function listRules($rules){
  12. ?>
  13. <script>
  14. function listItemTask( id, task ) {
  15. var f = document.adminForm;
  16. id.split('cb');
  17. f.task.value = task;
  18. f.publish_id.value = id.split('cb')[1];
  19. submitbutton(task);
  20. return false;
  21. }
  22. </script>
  23. <form action="index.php" method="post">
  24. <input type="hidden" name="option" value="com_breezingforms" />
  25. <input type="hidden" name="act" value="integrate" />
  26. <input type="hidden" name="task" value="" />
  27. </form>
  28. <?php
  29. if(count($rules) == 0){
  30. ?>
  31. <?php echo JText::_('No rules found');?>
  32. <?php
  33. }
  34. ?>
  35. <form action="index.php" method="post" name="adminForm" id="adminForm">
  36. <div id="editcell">
  37. <table class="adminlist table table-striped">
  38. <thead>
  39. <tr>
  40. <th width="5">
  41. <input type="checkbox" name="toggle" value="" onclick="<?php $version = new JVersion(); echo version_compare($version->getShortVersion(), '3.0', '>=') ? 'Joomla.checkAll(this);' : 'checkAll('.count($rules).');'; ?>" />
  42. </th>
  43. <th>
  44. <?php echo JText::_( 'Rulename' ); ?>
  45. </th>
  46. <th>
  47. <?php echo JText::_( 'Type' ); ?>
  48. </th>
  49. <th>
  50. <?php echo JText::_( 'Form' ); ?>
  51. </th>
  52. <th>
  53. <?php echo JText::_( 'Table' ); ?>
  54. </th>
  55. <th>
  56. <?php echo JText::_( 'published' ); ?>
  57. </th>
  58. </tr>
  59. </thead>
  60. <?php
  61. $k = 0;
  62. $cnt = count( $rules );
  63. for($i=0; $i < $cnt; $i++){
  64. $rule = $rules[$i];
  65. $published = JHTML::_('grid.published', $rule, $rule->id );
  66. $link = JRoute::_( 'index.php?option=com_breezingforms&act=integrate&task=edit&cid[]='. $rule->id );
  67. $checked = JHTML::_( 'grid.id', $i, $rule->id );
  68. ?>
  69. <tbody>
  70. <tr class="<?php echo "row$k"; ?>">
  71. <td><?php echo $checked; ?></td>
  72. <td><a href="index.php?option=com_breezingforms&act=integrate&task=edit&id=<?php echo $rule->id; ?>"><?php echo htmlentities($rule->name, ENT_COMPAT, 'UTF-8') ?></a></td>
  73. <td><a href="index.php?option=com_breezingforms&act=integrate&task=edit&id=<?php echo $rule->id; ?>"><?php echo htmlentities($rule->type, ENT_COMPAT, 'UTF-8') ?></a></td>
  74. <td><a href="index.php?option=com_breezingforms&act=integrate&task=edit&id=<?php echo $rule->id; ?>"><?php echo htmlentities($rule->form_name, ENT_COMPAT, 'UTF-8') ?></a></td>
  75. <td><a href="index.php?option=com_breezingforms&act=integrate&task=edit&id=<?php echo $rule->id; ?>"><?php echo htmlentities($rule->reference_table, ENT_COMPAT, 'UTF-8') ?></a></td>
  76. <td><?php echo $published; ?></td>
  77. </tr>
  78. <?php
  79. $k = 1 - $k;
  80. }
  81. ?>
  82. </tbody>
  83. </table>
  84. </div>
  85. <input type="hidden" name="option" value="com_breezingforms" />
  86. <input type="hidden" name="act" value="integrate" />
  87. <input type="hidden" name="task" value="" />
  88. <input type="hidden" name="boxchecked" value="0" />
  89. <input type="hidden" name="publish_id" value="-1" />
  90. </form>
  91. <br/>
  92. <br/>
  93. <?php
  94. }
  95. public static function edit($rule, $items, $tables, $forms, $formElements, $criteriaForm, $criteriaJoomla, $criteriaFixed){
  96. ?>
  97. <h3><?php echo JText::_('Base Data') ?></h3>
  98. <form action="index.php" method="post" name="adminForm" id="adminForm">
  99. <div id="editcell">
  100. <table class="adminlist table table-striped">
  101. <thead>
  102. <tr>
  103. <th width="300">
  104. <?php echo JText::_( 'Rulename' ); ?>
  105. </th>
  106. <th width="300">
  107. <?php echo JText::_( 'Form' ); ?>
  108. </th>
  109. <th width="300">
  110. <?php echo JText::_( 'Table' ); ?>
  111. </th>
  112. <th>
  113. <?php echo JText::_( 'Type' ); ?>
  114. </th>
  115. </tr>
  116. </thead>
  117. <tr class="row0">
  118. <td><input type="text" <?php echo $rule != null ? ' disabled="disabled" ' : '' ?> name="rule_name" value="<?php echo $rule != null ? htmlentities($rule->name, ENT_COMPAT, 'UTF-8') : '' ?>"/></td>
  119. <td>
  120. <?php
  121. $disabled = '';
  122. foreach($forms As $form){
  123. if(isset($rule) && $form->id == $rule->form_id){
  124. $disabled = ' disabled="disabled" ';
  125. break;
  126. }
  127. }
  128. ?>
  129. <select name="form_id" <?php echo $disabled ?>>
  130. <?php
  131. foreach($forms As $form){
  132. $selected = '';
  133. if(isset($rule) && $form->id == $rule->form_id){
  134. $selected = ' selected="selected"';
  135. }
  136. ?>
  137. <option <?php echo $selected ?> value="<?php echo htmlentities($form->id, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($form->name, ENT_COMPAT, 'UTF-8') ?></option>
  138. <?php
  139. }
  140. ?>
  141. </select>
  142. </td>
  143. <td>
  144. <?php
  145. $disabled = '';
  146. $settings = array();
  147. foreach($tables As $tableName => $tableSettings){
  148. $selected = '';
  149. if(isset($rule) && $tableName == $rule->reference_table){
  150. $settings = $tableSettings;
  151. $disabled = ' disabled="disabled" ';
  152. break;
  153. }
  154. }
  155. ?>
  156. <select name="reference_table" <?php echo $disabled ?>>
  157. <?php
  158. $refTable = '';
  159. foreach($tables As $tableName => $tableSettings){
  160. $selected = '';
  161. if(isset($rule) && $tableName == $rule->reference_table){
  162. $refTable = $tableName;
  163. $selected = ' selected="selected"';
  164. }
  165. ?>
  166. <option <?php echo $selected ?> value="<?php echo htmlentities($tableName, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($tableName, ENT_COMPAT, 'UTF-8') ?></option>
  167. <?php
  168. }
  169. ?>
  170. </select>
  171. </td>
  172. <td>
  173. <?php
  174. if(isset($rule)){
  175. echo $rule->type;
  176. } else {
  177. echo JText::_('Insert') . ' <input checked="checked" type="radio" name="type" value="insert"/> ' . JText::_('Update') . ' <input type="radio" name="type" value="update"/>';
  178. }
  179. ?>
  180. </td>
  181. </tr>
  182. </table>
  183. </div>
  184. <input type="hidden" name="option" value="com_breezingforms" />
  185. <input type="hidden" name="act" value="integrate" />
  186. <input type="hidden" name="task" value="update" />
  187. </form>
  188. <?php
  189. if($rule != null){
  190. ?>
  191. <br/>
  192. <h3><?php echo JText::_('Data Integration') ?></h3>
  193. <script>
  194. function listItemTask( id, task ) {
  195. var f = document.addItemForm;
  196. id.split('cb');
  197. f.publish_id.value = id.split('cb')[1];
  198. if(task == 'publish' || task== 'unpublish'){
  199. f.task.value = 'pub';
  200. f.pub.value = task;
  201. task = 'edit';
  202. }
  203. //f.task.value = task;
  204. f.submit();
  205. return false;
  206. }
  207. </script>
  208. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="addItemForm">
  209. <input type="hidden" name="publish_id" value="-1" />
  210. <input type="hidden" name="task" value="addItem" />
  211. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  212. <input type="hidden" name="pub" value="" />
  213. <table class="adminlist table table-striped">
  214. <thead>
  215. <tr>
  216. <th width="300">
  217. <?php echo JText::_( 'Form Element (incoming)' ); ?>
  218. </th>
  219. <th width="300">
  220. <?php echo JText::_( 'Copy To' ); ?>
  221. </th>
  222. <th width="300">
  223. <?php echo JText::_( 'Database Field (outgoing)' ); ?>
  224. </th>
  225. <th width="300">
  226. <?php echo JText::_( '' ); ?>
  227. </th>
  228. <th>
  229. <?php echo JText::_( 'Publish' ); ?>
  230. </th>
  231. </tr>
  232. </thead>
  233. <tr class="<?php echo "row0"; ?>">
  234. <td>
  235. <select name="element_id">
  236. <?php
  237. foreach($formElements As $formElement){
  238. if($formElement->name != 'bfFakeName' && $formElement->name != 'bfFakeName2' && $formElement->name != 'bfFakeName3' && $formElement->name != 'bfFakeName4'){
  239. ?>
  240. <option value="<?php echo $formElement->id ?>"><?php echo htmlentities($formElement->name, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($formElement->type, ENT_COMPAT, 'UTF-8') ?>)</option>
  241. <?php
  242. }
  243. }
  244. ?>
  245. </select>
  246. </td>
  247. <td align="center"><?php echo htmlentities('=>') ?></td>
  248. <td>
  249. <select name="reference_column">
  250. <?php
  251. foreach($tables[$refTable] As $fieldName => $fieldSettings){
  252. ?>
  253. <option value="<?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($fieldSettings, ENT_COMPAT, 'UTF-8') ?>)</option>
  254. <?php
  255. }
  256. ?>
  257. </select>
  258. </td>
  259. <td colspan="2"><a href="javascript:document.addItemForm.submit();"><?php echo JText::_('add') ?></a></td>
  260. </tr>
  261. <?php
  262. $k = 1;
  263. foreach($items As $item){
  264. $published = JHTML::_('grid.published', $item, $item->id );
  265. ?>
  266. <tr class="<?php echo "row$k"; ?>">
  267. <td><?php echo htmlentities($item->element_name, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($item->element_type, ENT_COMPAT, 'UTF-8') ?>)</td>
  268. <td align="center"><?php echo htmlentities('=>') ?></td>
  269. <td><?php echo htmlentities($item->reference_column, ENT_COMPAT, 'UTF-8') ?> (<?php echo $settings[$item->reference_column] ?>)</td>
  270. <td>
  271. <span id="code<?php echo $item->id ?>" style="display:none">
  272. <textarea id="codeText<?php echo $item->id ?>" style="width:100%;height:200px;" name="code"><?php echo htmlentities($item->code, ENT_COMPAT, 'UTF-8') ?></textarea>
  273. <br/>
  274. <a href="javascript:document.saveCodeForm.itemId.value=<?php echo $item->id ?>;document.saveCodeForm.code.value=document.getElementById('codeText<?php echo $item->id ?>').value;document.saveCodeForm.submit();"><?php echo JText::_('Save') ?></a> |
  275. </span>
  276. <a href="javascript:showCode(<?php echo $item->id ?>)"><?php echo JText::_('Code') ?></a>
  277. |
  278. <a href="index.php?option=com_breezingforms&act=integrate&task=removeItem&itemId=<?php echo $item->id ?>&id=<?php echo $rule->id ?>"><?php echo JText::_('Remove') ?></a></td>
  279. <td><?php echo $published; ?></td>
  280. </tr>
  281. <?php
  282. $k = 1 - $k;
  283. }
  284. ?>
  285. </table>
  286. </form>
  287. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="saveCodeForm">
  288. <input type="hidden" name="task" value="saveCode" />
  289. <input type="hidden" name="code" value="" />
  290. <input type="hidden" name="itemId" value="-1" />
  291. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  292. </form>
  293. <script>
  294. function showCode(id){
  295. if(document.getElementById('code'+id).style.display == 'none')
  296. document.getElementById('code'+id).style.display='';
  297. else
  298. document.getElementById('code'+id).style.display='none';
  299. }
  300. </script>
  301. <?php
  302. if($rule->type == 'update'){
  303. ?>
  304. <br/>
  305. <h3><?php echo JText::_('Update Criteria - Form') ?></h3>
  306. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="addCriteriaForm">
  307. <input type="hidden" name="publish_id" value="-1" />
  308. <input type="hidden" name="task" value="addCriteria" />
  309. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  310. <table class="adminlist table table-striped">
  311. <thead>
  312. <tr>
  313. <th width="300">
  314. <?php echo JText::_( 'Database Field Value' ); ?>
  315. </th>
  316. <th width="300">
  317. <?php echo JText::_( 'Operation' ); ?>
  318. </th>
  319. <th width="300">
  320. <?php echo JText::_( 'Form Element Value' ); ?>
  321. </th>
  322. <th width="100">
  323. <?php echo JText::_( 'And/Or' ); ?>
  324. </th>
  325. <th>
  326. <?php echo JText::_( '' ); ?>
  327. </th>
  328. </tr>
  329. </thead>
  330. <tr class="<?php echo "row0"; ?>">
  331. <td>
  332. <select name="reference_column">
  333. <?php
  334. foreach($tables[$refTable] As $fieldName => $fieldSettings){
  335. ?>
  336. <option value="<?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($fieldSettings, ENT_COMPAT, 'UTF-8') ?>)</option>
  337. <?php
  338. }
  339. ?>
  340. </select>
  341. </td>
  342. <td align="center">
  343. <select name="operator">
  344. <option value="<?php echo htmlentities('=') ?>">equals</option>
  345. <option value="<?php echo htmlentities('<>') ?>">not equal</option>
  346. <option value="<?php echo htmlentities('>') ?>">greater than</option>
  347. <option value="<?php echo htmlentities('<') ?>">less than</option>
  348. <option value="<?php echo htmlentities('>=') ?>">equals or greater than</option>
  349. <option value="<?php echo htmlentities('<=') ?>">equals or less than</option>
  350. <option value="<?php echo htmlentities('%...%') ?>">in value</option>
  351. <option value="<?php echo htmlentities('%...') ?>">starts with</option>
  352. <option value="<?php echo htmlentities('...%') ?>">ends with</option>
  353. </select>
  354. </td>
  355. <td>
  356. <select name="element_id">
  357. <?php
  358. foreach($formElements As $formElement){
  359. if($formElement->name != 'bfFakeName' && $formElement->name != 'bfFakeName2' && $formElement->name != 'bfFakeName3' && $formElement->name != 'bfFakeName4'){
  360. ?>
  361. <option value="<?php echo $formElement->id ?>"><?php echo htmlentities($formElement->name, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($formElement->type, ENT_COMPAT, 'UTF-8') ?>)</option>
  362. <?php
  363. }
  364. }
  365. ?>
  366. </select>
  367. </td>
  368. <td><?php echo JText::_('A N D') ?> <input type="radio" name="andor" value="AND" checked="checked" /> <?php echo JText::_('O R') ?> <input type="radio" name="andor" value="OR" /></td>
  369. <td colspan="2"><a href="javascript:document.addCriteriaForm.submit();"><?php echo JText::_('add') ?></a></td>
  370. </tr>
  371. <?php
  372. $k = 1;
  373. foreach($criteriaForm As $criteria){
  374. ?>
  375. <tr class="<?php echo "row$k"; ?>">
  376. <td><?php echo htmlentities($criteria->reference_column, ENT_COMPAT, 'UTF-8') ?> (<?php echo $settings[$criteria->reference_column] ?>)</td>
  377. <td align="center"><?php echo htmlentities($criteria->operator, ENT_COMPAT, 'UTF-8') ?></td>
  378. <td><?php echo htmlentities($criteria->element_name, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($criteria->element_type, ENT_COMPAT, 'UTF-8') ?>)</td>
  379. <td><?php echo htmlentities($criteria->andor, ENT_COMPAT, 'UTF-8') ?> </td>
  380. <td><a href="index.php?option=com_breezingforms&act=integrate&task=removeCriteria&criteriaId=<?php echo $criteria->id ?>&id=<?php echo $rule->id ?>"><?php echo JText::_('Remove') ?></a></td>
  381. </tr>
  382. <?php
  383. $k = 1 - $k;
  384. }
  385. ?>
  386. </table>
  387. </form>
  388. <br/>
  389. <h3><?php echo JText::_('Update Criteria - Joomla!') ?></h3>
  390. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="addCriteriaJoomlaForm">
  391. <input type="hidden" name="publish_id" value="-1" />
  392. <input type="hidden" name="task" value="addCriteriaJoomla" />
  393. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  394. <table class="adminlist table table-striped">
  395. <thead>
  396. <tr>
  397. <th width="300">
  398. <?php echo JText::_( 'Database Field Value' ); ?>
  399. </th>
  400. <th width="300">
  401. <?php echo JText::_( 'Operation' ); ?>
  402. </th>
  403. <th width="300">
  404. <?php echo JText::_( 'Joomla Object Value' ); ?>
  405. </th>
  406. <th width="100">
  407. <?php echo JText::_( 'And/Or' ); ?>
  408. </th>
  409. <th>
  410. <?php echo JText::_( '' ); ?>
  411. </th>
  412. </tr>
  413. </thead>
  414. <tr class="<?php echo "row0"; ?>">
  415. <td>
  416. <select name="reference_column">
  417. <?php
  418. foreach($tables[$refTable] As $fieldName => $fieldSettings){
  419. ?>
  420. <option value="<?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($fieldSettings, ENT_COMPAT, 'UTF-8') ?>)</option>
  421. <?php
  422. }
  423. ?>
  424. </select>
  425. </td>
  426. <td align="center">
  427. <select name="operator">
  428. <option value="<?php echo htmlentities('=') ?>">equals</option>
  429. <option value="<?php echo htmlentities('<>') ?>">not equal</option>
  430. <option value="<?php echo htmlentities('>') ?>">greater than</option>
  431. <option value="<?php echo htmlentities('<') ?>">less than</option>
  432. <option value="<?php echo htmlentities('>=') ?>">equals or greater than</option>
  433. <option value="<?php echo htmlentities('<=') ?>">equals or less than</option>
  434. <option value="<?php echo htmlentities('%...%') ?>">in value</option>
  435. <option value="<?php echo htmlentities('%...') ?>">starts with</option>
  436. <option value="<?php echo htmlentities('...%') ?>">ends with</option>
  437. </select>
  438. </td>
  439. <td>
  440. <select name="joomla_object">
  441. <option value="Userid"><?php echo JText::_('Userid') ?></option>
  442. <option value="Username"><?php echo JText::_('Username') ?></option>
  443. <option value="Language"><?php echo JText::_('Language') ?></option>
  444. <option value="Date"><?php echo JText::_('Date') ?></option>
  445. </select>
  446. </td>
  447. <td><?php echo JText::_('A N D') ?> <input type="radio" name="andor" value="AND" checked="checked" /> <?php echo JText::_('O R') ?> <input type="radio" name="andor" value="OR" /></td>
  448. <td colspan="2"><a href="javascript:document.addCriteriaJoomlaForm.submit();"><?php echo JText::_('add') ?></a></td>
  449. </tr>
  450. <?php
  451. $k = 1;
  452. foreach($criteriaJoomla As $criteria){
  453. ?>
  454. <tr class="<?php echo "row$k"; ?>">
  455. <td><?php echo htmlentities($criteria->reference_column, ENT_COMPAT, 'UTF-8') ?> (<?php echo $settings[$criteria->reference_column] ?>)</td>
  456. <td align="center"><?php echo htmlentities($criteria->operator, ENT_COMPAT, 'UTF-8') ?></td>
  457. <td><?php echo htmlentities($criteria->joomla_object, ENT_COMPAT, 'UTF-8') ?></td>
  458. <td><?php echo htmlentities($criteria->andor, ENT_COMPAT, 'UTF-8') ?> </td>
  459. <td><a href="index.php?option=com_breezingforms&act=integrate&task=removeCriteriaJoomla&criteriaId=<?php echo $criteria->id ?>&id=<?php echo $rule->id ?>"><?php echo JText::_('Remove') ?></a></td>
  460. </tr>
  461. <?php
  462. $k = 1 - $k;
  463. }
  464. ?>
  465. </table>
  466. </form>
  467. <br/>
  468. <h3><?php echo JText::_('Update Criteria - Fixed') ?></h3>
  469. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="addCriteriaFixedForm">
  470. <input type="hidden" name="publish_id" value="-1" />
  471. <input type="hidden" name="task" value="addCriteriaFixed" />
  472. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  473. <table class="adminlist table table-striped">
  474. <thead>
  475. <tr>
  476. <th width="300">
  477. <?php echo JText::_( 'Database Field Value' ); ?>
  478. </th>
  479. <th width="300">
  480. <?php echo JText::_( 'Operation' ); ?>
  481. </th>
  482. <th width="300">
  483. <?php echo JText::_( 'Fixed Value' ); ?>
  484. </th>
  485. <th width="100">
  486. <?php echo JText::_( 'And/Or' ); ?>
  487. </th>
  488. <th>
  489. <?php echo JText::_( '' ); ?>
  490. </th>
  491. </tr>
  492. </thead>
  493. <tr class="<?php echo "row0"; ?>">
  494. <td>
  495. <select name="reference_column">
  496. <?php
  497. foreach($tables[$refTable] As $fieldName => $fieldSettings){
  498. ?>
  499. <option value="<?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?>"><?php echo htmlentities($fieldName, ENT_COMPAT, 'UTF-8') ?> (<?php echo htmlentities($fieldSettings, ENT_COMPAT, 'UTF-8') ?>)</option>
  500. <?php
  501. }
  502. ?>
  503. </select>
  504. </td>
  505. <td align="center">
  506. <select name="operator">
  507. <option value="<?php echo htmlentities('=') ?>">equals</option>
  508. <option value="<?php echo htmlentities('<>') ?>">not equal</option>
  509. <option value="<?php echo htmlentities('>') ?>">greater than</option>
  510. <option value="<?php echo htmlentities('<') ?>">less than</option>
  511. <option value="<?php echo htmlentities('>=') ?>">equals or greater than</option>
  512. <option value="<?php echo htmlentities('<=') ?>">equals or less than</option>
  513. <option value="<?php echo htmlentities('%...%') ?>">in value</option>
  514. <option value="<?php echo htmlentities('%...') ?>">starts with</option>
  515. <option value="<?php echo htmlentities('...%') ?>">ends with</option>
  516. </select>
  517. </td>
  518. <td>
  519. <input style="width:100%" type="text" name="fixed_value" value=""/>
  520. </td>
  521. <td><?php echo JText::_('A N D') ?> <input type="radio" name="andor" value="AND" checked="checked" /> <?php echo JText::_('O R') ?> <input type="radio" name="andor" value="OR" /></td>
  522. <td colspan="2"><a href="javascript:document.addCriteriaFixedForm.submit();"><?php echo JText::_('add') ?></a></td>
  523. </tr>
  524. <?php
  525. $k = 1;
  526. foreach($criteriaFixed As $criteria){
  527. ?>
  528. <tr class="<?php echo "row$k"; ?>">
  529. <td><?php echo htmlentities($criteria->reference_column, ENT_COMPAT, 'UTF-8') ?> (<?php echo $settings[$criteria->reference_column] ?>)</td>
  530. <td align="center"><?php echo htmlentities($criteria->operator, ENT_COMPAT, 'UTF-8') ?></td>
  531. <td><?php echo htmlentities($criteria->fixed_value, ENT_COMPAT, 'UTF-8') ?> </td>
  532. <td><?php echo htmlentities($criteria->andor, ENT_COMPAT, 'UTF-8') ?> </td>
  533. <td><a href="index.php?option=com_breezingforms&act=integrate&task=removeCriteriaFixed&criteriaId=<?php echo $criteria->id ?>&id=<?php echo $rule->id ?>"><?php echo JText::_('Remove') ?></a></td>
  534. </tr>
  535. <?php
  536. $k = 1 - $k;
  537. }
  538. ?>
  539. </table>
  540. </form>
  541. <?php
  542. }
  543. }
  544. if($rule != null){
  545. ?>
  546. <br/>
  547. <h3><?php echo JText::_('Finalize Code') ?></h3>
  548. <form action="index.php?option=com_breezingforms&act=integrate" method="post" name="saveFinalizeCodeForm">
  549. <input type="hidden" name="publish_id" value="-1" />
  550. <input type="hidden" name="task" value="saveFinalizeCode" />
  551. <input type="hidden" name="id" value="<?php echo $rule->id ?>" />
  552. <textarea id="finalizeCodeText" style="width:100%;height:100px;" name="finalizeCode"><?php echo htmlentities($rule->finalize_code, ENT_COMPAT, 'UTF-8') ?></textarea>
  553. <br/>
  554. <a href="javascript:document.saveFinalizeCodeForm.submit();"><?php echo JText::_('Save') ?></a>
  555. </form>
  556. <?php
  557. }
  558. }
  559. }