\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; }