| @@ 1194-1197 (lines=4) @@ | ||
| 1191 | echo " $name: " . $_lang['upgraded'] . PHP_EOL; |
|
| 1192 | } else { |
|
| 1193 | $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');"; |
|
| 1194 | if (!mysqli_query($sqlParser->conn, $q)) { |
|
| 1195 | echo mysqli_error($sqlParser->conn) . PHP_EOL; |
|
| 1196 | ||
| 1197 | return; |
|
| 1198 | } |
|
| 1199 | echo " $name: " . $_lang['installed'] . PHP_EOL; |
|
| 1200 | } |
|
| @@ 384-387 (lines=4) @@ | ||
| 381 | } else { |
|
| 382 | //$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');"; |
|
| 383 | $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');"; |
|
| 384 | if (!mysqli_query($sqlParser->conn, $q)) { |
|
| 385 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
|
| 386 | return; |
|
| 387 | } |
|
| 388 | echo "<p> $name: <span class=\"ok\">" . $_lang['installed'] . "</span></p>"; |
|
| 389 | } |
|
| 390 | ||