| @@ 401-404 (lines=4) @@ | ||
| 398 | } else { |
|
| 399 | //$q = "INSERT INTO $dbase.`" . $table_prefix . "site_tmplvars` (type,name,caption,description,category,locked,elements,display,display_params,default_text) VALUES('$input_type','$name','$caption','$desc',(SELECT (CASE COUNT(*) WHEN 0 THEN 0 ELSE `id` END) `id` FROM $dbase.`" . $table_prefix . "categories` WHERE `category` = '$category'),$locked,'$input_options','$output_widget','$output_widget_params','$input_default');"; |
|
| 400 | $q = "INSERT INTO $dbase.`" . $table_prefix . "site_tmplvars` (type,name,caption,description,category,locked,elements,display,display_params,default_text) VALUES('$input_type','$name','$caption','$desc',$category,$locked,'$input_options','$output_widget','$output_widget_params','$input_default');"; |
|
| 401 | if (!mysqli_query($sqlParser->conn, $q)) { |
|
| 402 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
|
| 403 | return; |
|
| 404 | } |
|
| 405 | echo "<p> $name: <span class=\"ok\">" . $_lang['installed'] . "</span></p>"; |
|
| 406 | } |
|
| 407 | ||
| @@ 1126-1129 (lines=4) @@ | ||
| 1123 | echo " $name: " . $_lang['upgraded'] . PHP_EOL; |
|
| 1124 | } else { |
|
| 1125 | $q = "INSERT INTO $dbase.`" . $table_prefix . "site_tmplvars` (type,name,caption,description,category,locked,elements,display,display_params,default_text) VALUES('$input_type','$name','$caption','$desc',$category,$locked,'$input_options','$output_widget','$output_widget_params','$input_default');"; |
|
| 1126 | if (!mysqli_query($sqlParser->conn, $q)) { |
|
| 1127 | echo mysqli_error($sqlParser->conn) . PHP_EOL; |
|
| 1128 | return; |
|
| 1129 | } |
|
| 1130 | echo " $name: " . $_lang['installed'] . PHP_EOL; |
|
| 1131 | } |
|
| 1132 | ||