From 5c7f2f17f9c471d306955df457c7cab4e5c6ed3b Mon Sep 17 00:00:00 2001 From: Snap Date: Thu, 16 Apr 2015 14:51:26 -0700 Subject: Google's OpenID Connect method $google_client_id & $google_client_secret must be added to db.inc.php! --- .../examples/templates/base.php | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 includes/google-api-php-client-master/examples/templates/base.php (limited to 'includes/google-api-php-client-master/examples/templates') diff --git a/includes/google-api-php-client-master/examples/templates/base.php b/includes/google-api-php-client-master/examples/templates/base.php new file mode 100644 index 0000000..34241e9 --- /dev/null +++ b/includes/google-api-php-client-master/examples/templates/base.php @@ -0,0 +1,90 @@ + + + + " . $title . " + + + \n"; + if ($_SERVER['PHP_SELF'] != "/index.php") { + $ret .= "

Back

"; + } + $ret .= "

" . $title . "

"; + } + return $ret; +} + + +function pageFooter($file = null) +{ + $ret = ""; + if (isWebRequest()) { + // Echo the code if in an example. + if ($file) { + $ret .= "

Code:

"; + $ret .= "
";
+      $ret .= htmlspecialchars(file_get_contents($file));
+      $ret .= "
"; + } + $ret .= ""; + } + return $ret; +} + +function missingApiKeyWarning() +{ + $ret = ""; + if (isWebRequest()) { + $ret = " +

+ Warning: You need to set a Simple API Access key from the + Google API console +

"; + } else { + $ret = "Warning: You need to set a Simple API Access key from the Google API console:"; + $ret .= "\nhttp://developers.google.com/console\n"; + } + return $ret; +} + +function missingClientSecretsWarning() +{ + $ret = ""; + if (isWebRequest()) { + $ret = " +

+ Warning: You need to set Client ID, Client Secret and Redirect URI from the + Google API console +

"; + } else { + $ret = "Warning: You need to set Client ID, Client Secret and Redirect URI from the"; + $ret .= " Google API console:\nhttp://developers.google.com/console\n"; + } + return $ret; +} + +function missingServiceAccountDetailsWarning() +{ + $ret = ""; + if (isWebRequest()) { + $ret = " +

+ Warning: You need to set Client ID, Email address and the location of the Key from the + Google API console +

"; + } else { + $ret = "Warning: You need to set Client ID, Email address and the location of the Key from the"; + $ret .= " Google API console:\nhttp://developers.google.com/console\n"; + } + return $ret; +} -- cgit v1.2.3