-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ian
committed
Nov 21, 2023
1 parent
95f69b3
commit 6f8b814
Showing
10 changed files
with
129 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
require_once "root.php"; | ||
require_once "resources/require.php"; | ||
require_once "resources/check_auth.php"; | ||
require_once "resources/header.php"; | ||
require_once "resources/paging.php"; | ||
|
||
foreach ($_SESSION['user']['extension'] as $ext) { | ||
if ($ext['extension_uuid'] == $_POST['extension_uuid']) { | ||
$extension = $ext; | ||
break; | ||
} | ||
} | ||
|
||
if (!$extension) { | ||
echo "invalid extension, please <a href='index.php'>try again</a>"; | ||
include "footer.php"; | ||
die(); | ||
} | ||
|
||
if($_POST['action']) { | ||
$sql = "UPDATE webtexting_groups SET name = :name WHERE group_uuid = :group_uuid AND extension_uuid = :extension_uuid AND domain_uuid = :domain_uuid"; | ||
$parameters['name'] = $_POST['name']; | ||
$parameters['group_uuid'] = $_POST['group']; | ||
$parameters['extension_uuid'] = $_POST['extension_uuid']; | ||
$parameters['domain_uuid'] = $domain_uuid; | ||
if($database->execute($sql, $parameters)) { | ||
message::add("group renamed"); | ||
} else { | ||
message::add("error renaming group", 'negative'); | ||
} | ||
unset($parameters); | ||
|
||
// redirect to the same page so the user's request to the page is a GET and refreshing doesn't re-run the action | ||
header("Location: /app/webtexting/threadlist.php?extension_uuid=".$_POST['extension_uuid']); | ||
die(); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
$url = $_SERVER["HTTP_REFERER"]."threadlist.php?extension_uuid=".$_GET["extension_uuid"]; | ||
|
||
$url = $_SERVER["HTTP_ORIGIN"]."/app/webtexting/threadlist.php?extension_uuid=".$_GET["extension_uuid"]; | ||
header("Location: ".$url); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters