-
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #716 from causefx/develop
Develop
- Loading branch information
Showing
101 changed files
with
9,738 additions
and
478 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<?php | ||
// Include functions | ||
require_once('user.php'); | ||
$USER = new User('registration_callback'); | ||
$USER = new User(); | ||
// Get Action | ||
if (isset($_POST['a'])) { $action = $_POST['a']; } | ||
if (isset($_POST['k'])) { $key = $_POST['k']; } | ||
if (isset($_POST['v'])) { $values = $_POST['v']; } | ||
if (isset($_GET['a'])) { $action = $_GET['a']; } | ||
if (isset($_GET['k'])) { $key = $_GET['k']; } | ||
if (isset($_GET['v'])) { $values = explode('|',$_GET['v']); } | ||
if (isset($_GET['v'])) { | ||
$values = (strpos($_GET['v'], '|') !== false ? explode('|',$_GET['v']) : $_GET['v']); | ||
} | ||
unset($_POST['a']); | ||
unset($_POST['k']); | ||
unset($_POST['v']); | ||
|
@@ -35,15 +37,33 @@ | |
$email = $values[1]; | ||
$server = $values[2]; | ||
} | ||
//$USER = new User(); | ||
$USER->invite_user("chris", "[email protected]", "plex"); | ||
$result['data'] = "User has been invited"; | ||
//$result['data'] = "user = $user | email = $email | server = $server"; | ||
}else{ | ||
$result['error'] = "No Values Were Set For Function"; | ||
} | ||
break; | ||
case "2": | ||
$result = "other test"; | ||
case "ombi": | ||
if($values){ | ||
switch ($values) { | ||
case 'plex-update': | ||
$ombi = ombiAPI('plex-cache'); | ||
if($ombi){ | ||
$result['data'] = "Plex Content Cache Successful"; | ||
}else{ | ||
$result['error'] = "Plex Content Cache Error"; | ||
} | ||
break; | ||
default: | ||
$result['error'] = "$values is not a valid Ombi function"; | ||
break; | ||
} | ||
}else{ | ||
$result['error'] = "No Ombi Action Supplied"; | ||
} | ||
|
||
break; | ||
default: | ||
$result = "$action Not Defined As API Function"; | ||
|
@@ -57,4 +77,4 @@ | |
} | ||
//return JSON array | ||
exit(json_encode($result)); | ||
?> | ||
?> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.