| @@ 1049-1056 (lines=8) @@ | ||
| 1046 | echo mysqli_error($sqlParser->conn) . PHP_EOL; |
|
| 1047 | return; |
|
| 1048 | } |
|
| 1049 | if(!is_null($save_sql_id_as)) { |
|
| 1050 | $sql_id = @mysqli_insert_id($sqlParser->conn); |
|
| 1051 | if(!$sql_id) { |
|
| 1052 | $idQuery = mysqli_fetch_assoc(mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name' LIMIT 1;")); |
|
| 1053 | $sql_id = $idQuery['id']; |
|
| 1054 | } |
|
| 1055 | $custom_placeholders[$save_sql_id_as] = $sql_id; |
|
| 1056 | } |
|
| 1057 | echo " $name: " . $_lang['upgraded'] . PHP_EOL; |
|
| 1058 | } else { |
|
| 1059 | if (!@ mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_templates` (templatename,description,content,category,locked) VALUES('$name','$desc','$template',$category_id,'$locked');")) { |
|
| @@ 340-347 (lines=8) @@ | ||
| 337 | echo "<p>" . mysqli_error($sqlParser->conn) . "</p>"; |
|
| 338 | return; |
|
| 339 | } |
|
| 340 | if(!is_null($save_sql_id_as)) { |
|
| 341 | $sql_id = @mysqli_insert_id($sqlParser->conn); |
|
| 342 | if(!$sql_id) { |
|
| 343 | $idQuery = mysqli_fetch_assoc(mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name' LIMIT 1;")); |
|
| 344 | $sql_id = $idQuery['id']; |
|
| 345 | } |
|
| 346 | $custom_placeholders[$save_sql_id_as] = $sql_id; |
|
| 347 | } |
|
| 348 | echo "<p> $name: <span class=\"ok\">" . $_lang['upgraded'] . "</span></p>"; |
|
| 349 | } else { |
|
| 350 | if (!@ mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_templates` (templatename,description,content,category,locked) VALUES('$name','$desc','$template',$category_id,'$locked');")) { |
|