Romanian update
[phpmyadmin/sankalp_k.git] / libraries / tbl_triggers.lib.php
blobaf6f0b235f7bd29f2c8aa4b71dcb2539579631a3
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 */
8 $url_query .= '&amp;goto=tbl_structure.php';
10 $triggers = PMA_DBI_get_triggers($db, $table);
12 if ($triggers) {
13 echo '<div id="tabletriggers">' . "\n";
14 echo '<table class="data">' . "\n";
15 echo ' <caption class="tblHeaders">' . $strTriggers . '</caption>' . "\n";
16 echo sprintf('<tr>
17 <th>%s</th>
18 <th>&nbsp;</th>
19 <th>&nbsp;</th>
20 <th>%s</th>
21 <th>%s</th>
22 </tr>',
23 $strName,
24 $strTime,
25 $strEvent);
26 $ct=0;
27 $delimiter = '//';
28 foreach ($triggers as $trigger) {
29 $drop_and_create = $trigger['drop'] . $delimiter . "\n" . $trigger['create'] . "\n";
31 echo sprintf('<tr class="%s">
32 <td><b>%s</b></td>
33 <td>%s</td>
34 <td>%s</td>
35 <td>%s</td>
36 <td>%s</td>
37 </tr>',
38 ($ct%2 == 0) ? 'even' : 'odd',
39 $trigger['name'],
40 '<a href="tbl_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($drop_and_create) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter) . '">' . $titles['Change'] . '</a>',
41 '<a href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" onclick="return confirmLink(this, \'' . PMA_jsFormat($trigger['drop'], false) . '\')">' . $titles['Drop'] . '</a>',
42 $trigger['action_timing'],
43 $trigger['event_manipulation']);
44 $ct++;
46 echo '</table>';
47 echo '</div>' . "\n";