4733: strpos takes two parameter. The first one is missing, $_REQUEST[p] should...
authorharris wong <hwong@ocad.ca>
Tue, 16 Aug 2011 18:36:30 +0000 (18:36 -0000)
committerharris wong <hwong@ocad.ca>
Tue, 16 Aug 2011 18:36:30 +0000 (18:36 -0000)
docs/mods/_core/users/instructor_requests.php

index f3d0e98..54d96f6 100644 (file)
 // $Id$
 
 $_user_location = 'admin';
+/**
+ * A simple method to sign the request with the secret using HMAC.  
+ * @param   String      the URL which we want to sign
+ * @param   String      Use UTC time, gmdate("Y-m-d\TH:i:s\Z");
+ * @param   String      Hashed secret.  Unique per user.   
+ */
+function at_sign_request($url, $timestamp = "", $secretKey = "") {
+    global $dao;
+    $timestamp = gmdate("Y-m-d\TH:i:s\Z");    
+    $queryArray = explode('&', $url);
+    print_r($queryArray);
+
+//    $secretKey = 
+}
+
+/**
+ * Verify request 
+ *
+ */
+function at_verify_request($signedUrl) {
+    
+}
+at_sign_request('a=3&b=4&id=123&approve=12');
+exit;
 
 define('AT_INCLUDE_PATH', '../../../include/');
 require(AT_INCLUDE_PATH.'vitals.inc.php');
@@ -125,4 +149,4 @@ $num_pending = mysql_num_rows($result);
 </table>
 </form>
 
-<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
+<?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>