| @@ 1110-1113 (lines=4) @@ | ||
| 1107 | echo " $name: " . $_lang['upgraded'] . PHP_EOL; |
|
| 1108 | } else { |
|
| 1109 | $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');"; |
|
| 1110 | if (!mysqli_query($sqlParser->conn, $q)) { |
|
| 1111 | echo mysqli_error($sqlParser->conn) . PHP_EOL; |
|
| 1112 | return; |
|
| 1113 | } |
|
| 1114 | echo " $name: " . $_lang['installed'] . PHP_EOL; |
|
| 1115 | } |
|
| 1116 | ||
| @@ 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 | ||