
ted_chou12
Members-
Posts
1,488 -
Joined
-
Last visited
Everything posted by ted_chou12
-
[[ TOKEN, DOMAIN1, and DOMAIN2 are redactions --requinix ]] Hi, I have a piece of code that I can execute with bash curl without problem: mac70:gsuite_automate ted.chou$ curl -H "Authorization: OAuth TOKEN" https://apps-apis.google.com/a/feeds/domain/2.0/DOMAIN1/sso/general -v * Trying 64.233.187.118... * TCP_NODELAY set * Connected to apps-apis.google.com (64.233.187.118) port 443 (#0) * TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 * Server certificate: *.google.com * Server certificate: Google Internet Authority G2 * Server certificate: GeoTrust Global CA > GET /a/feeds/domain/2.0/DOMAIN1/sso/general HTTP/1.1 > Host: apps-apis.google.com > User-Agent: curl/7.51.0 > Accept: */* > Authorization: OAuth TOKEN > < HTTP/1.1 200 OK < Content-Type: application/atom+xml; charset=UTF-8 < Expires: Tue, 24 Jan 2017 13:20:21 GMT < Date: Tue, 24 Jan 2017 13:20:21 GMT < Cache-Control: private, max-age=0, must-revalidate, no-transform < Vary: Accept, X-GData-Authorization, GData-Version < GData-Version: 1.0 < Last-Modified: Tue, 24 Jan 2017 13:20:21 GMT < Transfer-Encoding: chunked < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; mode=block < Server: GSE < Alt-Svc: quic=":443"; ma=2592000; v="35,34" < * Curl_http_done: called premature == 0 * Connection #0 to host apps-apis.google.com left intact <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'><id>https://apps-apis.google.com/a/feeds/domain/2.0/DOMAIN1/sso/general</id><updated>2017-01-24T13:20:21.003Z</updated><link rel='self' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/domain/2.0/DOMAIN1/sso/general'/><link rel='edit' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/domain/2.0/DOMAIN1/sso/general'/><apps:property name='enableSSO' value='true'/><apps:property name='changePasswordUri' value='https://DOMAIN2/sso/DOMAIN1/login'/><apps:property name='useDomainSpecificIssuer' value='true'/><apps:property name='samlLogoutUri' value='https://DOMAIN2/sso/DOMAIN1/logout'/><apps:property name='ssoWhitelist' value=''/><apps:property name='samlSignonUri' value='https://DOMAIN2/sso/DOMAIN1/login'/></entry>mac70:gsuite_automate ted.chou$ But I can't seem to reproduce it with the curl in PHP: $crl = curl_init(); $headr = array(); $headr[] = 'Content-length: 0'; $headr[] = 'Content-type: application/json'; $headr[] = 'Authorization: OAuth ' . $access_token; curl_setopt($crl, CURLOPT_URL, 'https://apps-apis.google.com/a/feeds/domain/2.0/DOMAIN1/sso/general'); curl_setopt($crl, CURLOPT_HEADER, true); curl_setopt($crl, CURLOPT_HTTPHEADER, $headr); curl_setopt($crl, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($crl, CURLOPT_POST, false); curl_setopt($crl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($crl, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($crl); curl_close($crl); echo json_decode($result);
-
Hi, I have an output of print_r here: Google_Service_Calendar_Acl_Resource Object ( [stackParameters:Google_Service_Resource:private] => Array ( [alt] => Array ( [type] => string [location] => query ) [fields] => Array ( [type] => string [location] => query ) [trace] => Array I am wondering what is the right syntax to create the instance and set the variables? Thanks, Ted
-
restaurant manager application wrote in php (zip and tar)
ted_chou12 replied to ted_chou12's topic in Miscellaneous
here is the sqlite copy 18947_.tar -
restaurant manager application wrote in php (zip and tar)
ted_chou12 posted a topic in Miscellaneous
Hi, I written this a long time ago, my intention was for my aunt's restaurant, but I guess it was never used. I dig it up somewhere from my files, I took quite some time to write this (although this is in PHP), ie you must have a apache, or lighttpd (php environment) to run it. But I consulted my aunt for a large part of this. I think many ideas and applications can be a good fundamental to start with. Most of all, I don't want it to be wasted. By any chance if someone is looking for a PHP application that could probably be used online, not restricted to restaurant, a bookstore db, or anything, feel free to edit and change to suit your needs. I have the original mysql version, as well as the sqlite version. I guess it would take some time for the environmental variables to be fixed too. Thanks for letting me share this. Ted 18946_.zip -
thanks! I didn't realize it does conflict with the order by command in this case. I wish I had picked some other word.
-
Hi, I am trying to get sql to work and inster by querying several statements thru php: INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('1', '1', '', '0', '0', 's1' , '3' , '1-2,2-4' , '' , '0', '0', '', '2009-05-27 23:37:38', '0000-00-00 00:00:00', '2' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('2', '1', '', '0', '0', 's4' , '3' , '1-2' , '' , '0', '0', '', '2009-05-13 23:40:51', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('9', '0', 'choui', '2147483647', '0', '' , '0' , '1-1,2-2' , '' , '5', '0', '0', '2009-06-01 14:11:59', '2009-06-06 01:55:03', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('6', '1', '', '0', '0', 'T1' , '0' , '1-1' , '' , '6', '0', '', '2009-06-01 09:20:51', '0000-00-00 00:00:00', '0' , 'yes! ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('5', '0', 'alibaba', '5204992222', '0', '' , '0' , '1-4,2-2' , '' , '0', '0', '0', '2009-06-01 09:19:13', '2009-06-06 01:55:44', '4' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('7', '1', '', '0', '0', 'T2' , '11' , '1-1,2-2' , '' , '5', '0', '', '2009-06-01 09:21:29', '2009-06-01 14:21:45', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('8', '0', 'ted', '0', '0', '' , '0' , '1-2,2-3' , '' , '0', '0', '', '2009-06-01 11:27:23', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('10', '1', '', '0', '0', 'S1' , '9' , '1-4' , '' , '0', '0', '', '2009-06-02 08:26:41', '0000-00-00 00:00:00', '3' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('11', '1', '', '0', '0', 'S1' , '9' , '1-4' , '' , '0', '0', '', '2009-06-02 08:26:41', '0000-00-00 00:00:00', '1' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('12', '1', '', '0', '0', 'S4' , '2' , '2-2,3-4' , '' , '5', '0', '', '2009-06-03 11:20:53', '0000-00-00 00:00:00', '2' , 'B-day coupon ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('13', '0', 'Ted', '52044923', '0', '' , '0' , '2-2' , '' , '3', '0', '0', '2009-06-04 13:09:08', '2009-06-06 01:44:38', '3' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('14', '1', '', '0', '0', '1/2' , '2' , '2-2,3-1' , '' , '5', '0', '0', '2009-06-05 20:44:26', '2009-06-05 22:18:43', '2' , 'B-day coupon ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('15', '1', '', '0', '0', 'T1' , '3' , '1-1' , '' , '10', '0', '1', '2009-06-05 22:36:21', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('16', '1', '', '0', '0', 'T1' , '3' , '2-2,3-1' , '' , '5', '0', '0,1', '2009-06-05 22:36:30', '2009-06-05 22:43:35', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('17', '1', '', '0', '0', 'T1' , '3' , '1-1,2-1,3-1,5-1' , '' , '10', '0', '0,3', '2009-06-05 22:36:38', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('18', '0', 'Test', '2147483647', '0', '' , '0' , '1-2' , '' , '0', '0', '0', '2009-06-06 01:46:05', '2009-06-06 01:50:43', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('19', '0', 'Ted', '9184881911', '0', '' , '0' , '1-2' , '' , '5', '0', '3', '2009-06-06 02:00:32', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('20', '1', '', '', '0', '2/1' , '5' , '2-2,3-3' , '' , '7', '0', '0', '2009-06-06 02:00:58', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('21', '1', '', '', '0', '3/4' , '5' , '2-4' , '' , '0', '0', '', '2009-06-06 02:01:16', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('22', '1', '', '', '0', '5/4' , '2' , '3-2' , '' , '0', '0', '', '2009-06-06 02:01:29', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('23', '0', 'ali', '1294109410', '0', '' , '0' , '1-2,2-3' , '' , '5', '0', '0', '2009-06-06 02:01:56', '0000-00-00 00:00:00', '4' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('24', '1', '', '', '0', '1/2' , '2' , '1-3' , '' , '5', '0', '0', '2009-06-06 18:00:30', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('25', '1', '', '', '0', '1/2' , '2' , '1-4,2-2,3-3,6-6' , '' , '5', '0', '0,1', '2009-06-06 18:06:07', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('26', '1', '', '', '0', '1/2' , '2' , '1-4,2-2,3-3,6-6' , '' , '5', '0', '3', '2009-06-06 18:06:22', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('27', '1', '', '', '0', '1/2' , '2' , '1-1,2-1,6-1' , '' , '5', '0', '2', '2009-06-06 18:08:16', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('28', '1', '', '', '2', '1/2' , '2' , '1-1,2-1,6-1' , '' , '5', '0', '1', '2009-06-06 18:13:39', '2009-06-07 22:59:57', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('29', '1', '', '', '0', '1/2' , '2' , '2-1' , '' , '5', '0', '0', '2009-06-06 18:14:12', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('30', '1', '', '', '0', '1/2' , '2' , '1-3' , '' , '5', '0', '0', '2009-06-06 18:14:38', '0000-00-00 00:00:00', '1' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('31', '1', '', '', '0', '1/2' , '2' , '6-4' , '' , '5', '0', '0', '2009-06-06 18:14:58', '0000-00-00 00:00:00', '5' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('32', '1', '', '', '0', '2/5' , '0' , '2-1' , '' , '0', '0', '', '2009-06-06 18:30:03', '2009-06-06 18:34:48', '1' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('33', '1', '', '', '0', '2/3' , '3' , '3-2' , '' , '0', '0', '', '2009-06-06 18:32:30', '0000-00-00 00:00:00', '4' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('34', '1', '', '', '0', '3/5' , '5' , '7-3' , '' , '0', '0', '', '2009-06-07 00:23:42', '2009-06-07 18:36:26', '3' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('35', '1', '', '', '0', '5/6' , '2' , '1-2,2-3' , '' , '0', '0', '', '2009-06-07 01:02:45', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('36', '1', '', '', '4', '5/6' , '2' , '1-2,2-3' , '' , '0', '0', '', '2009-06-07 01:05:30', '2009-06-07 18:48:45', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('37', '1', '', '', '0', '5/3' , '5' , '1-2,2-3,6-2' , '' , '0', '0', '', '2009-06-07 01:08:27', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('38', '1', '', '', '0', '5/3' , '5' , '1-2,2-3,6-2' , '' , '0', '0', '', '2009-06-07 01:15:58', '0000-00-00 00:00:00', '4' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('39', '1', '', '', '0', '1' , '2' , '1-1,2-2,7-6' , '' , '0', '0', '', '2009-06-07 16:02:30', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('40', '1', '', '', '0', '2/1' , '1' , '7-1,9-1' , '' , '0', '0', '', '2009-06-07 16:40:46', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('41', '1', '', '', '4', '2' , '1' , '7-1,9-1' , '1,3.95,Teds Dish' , '0', '0', '', '2009-06-07 16:44:44', '2009-06-08 01:55:20', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('42', '1', '', '', '0', '1' , '2' , '3-1,6-1,11-1,22-1' , '' , '0', '0', '', '2009-06-07 16:48:07', '0000-00-00 00:00:00', '0' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('43', '1', '', '', '3', '1/2' , '5' , '9-1,13-1,16-1' , '' , '0', '0', '', '2009-06-07 17:07:17', '2009-06-08 16:03:37', '1' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('44', '1', '', '', '3', '2/3' , '11' , '5-3,11-1' , '' , '0', '2', '', '2009-04-01 19:22:28', '2009-06-07 20:51:17', '1' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('45', '1', '', '', '3', '1/5' , '11' , '14-1,15-2,17-1,18-2,19-1' , '' , '0', '5', '', '2009-06-07 19:47:00', '2009-06-08 01:11:19', '3' , ' ' ) INSERT INTO order (id, type, name, phone, waiter, tableno, guestno, orders, specialorder, coupon, coupon1, couponcat, time, time1, paid, additional) VALUES ('46', '1', '', '', '5', '1/3' , '7' , '17-1,18-3' , '2,5.40,Chef' , '0', '5', '', '2009-06-08 13:22:01', '2009-06-08 16:12:12', '4' , ' ' ) the error comes out: Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 Warning: sqlite_query() [function.sqlite-query]: near "order": syntax error in /var/www/restaurant/backup/test.php on line 11 But the syntax error doesn't seem to reveal much, Thanks, Ted
-
I think you should separate your sentence with comma before you try to nest your array with comma. Ted
-
Hi, I will post the entire code up, this is my page, I cant spot any errors: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../style/daleri-single.css" /> <title>File Explorer</title> </head> <body> <div id="wrap"> <h1><a href="index.html">NAS Home Page</a></h1> <p class="slogan">File Explorer</p> <p class="toptabs"> [color=red] <script language="JavaScript"> function setValue(value){ folderlist.folder.value = value; downloadfile.download.value = value; actions.folder.value = value; return true; } function ConfirmDownload(filename){ return confirm ('Download file ' + filename + ' ?'); } </script> [/color] <a class="toptab" href="../index.html">Home</a><span class="hide"> | </span> <a class="toptab" href="samba.cgi">Samba</a><span class="hide"> | </span> <a class="toptab" href="fileexplorer.cgi">File Manager</a><span class="hide"> | </span> <a class="toptab" href="cron.cgi">Cron Jobs</a><span class="hide"> | </span> <a class="toptab" href="lighttpd.cgi">Lighttpd</a><span class="hide"> | </span> <a class="toptab" href="mediaserver.cgi">Media Server</a><span class="hide"> | </span> </p> <div id="maincontent"> <div style="text-align:right;"><b style="float:left;">Current directory: /</b> <a onClick="setValue('extra.txt'); downloadfile.submit();" style="cursor:pointer;"><b>Move Up Directory</b></a> <a onClick="setValue('');folderlist.submit();" style="cursor:pointer;"><b>Refresh Current Directory</b></a></div> [color=red]<form id=folderlist name=folderlist action="/cgi-bin/smbclient.cgi" method="POST"> <pre><table> <tr><td><a onClick="setValue('/.');folderlist.submit();" style="cursor:pointer;"><img src="../style/fex/folder.png" /></a></td> <td style="width:270px"><a onClick="setValue('/.');folderlist.submit();" style="cursor:pointer;"><font color="black">.</font></a></td> <td> D 0 Sat Jul 17 15:56:42 2010</td></tr><tr><td><a onClick="setValue('/..');folderlist.submit();" style="cursor:pointer;"><img src="../style/fex/folder.png" /></a></td> <td style="width:270px"><a onClick="setValue('/..');folderlist.submit();" style="cursor:pointer;"><font color="black">..</font></a></td> <td> D 0 Sat Jul 17 15:56:42 2010</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('1.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('1.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">1.txt</font></a></td> <td> A 127 Fri Aug 31 10:14:51 2007</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('2.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('2.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">2.txt</font></a></td> <td> A 427 Wed Jun 25 12:41:44 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('college.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('college.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">college.txt</font></a></td> <td> A 2125 Sat Apr 28 17:52:02 2007</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('complaint.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('complaint.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">complaint.txt</font></a></td> <td> A 371 Wed Aug 29 07:55:25 2007</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('extra.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('extra.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">extra.txt</font></a></td> <td> A 1377 Thu Apr 3 11:51:33 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('gash.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('gash.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">gash.txt</font></a></td> <td> A 883 Sun Mar 30 10:57:42 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('links.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('links.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">links.txt</font></a></td> <td> A 1040 Tue May 15 07:56:39 2007</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('memory...txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('memory...txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">memory...txt</font></a></td> <td> A 7279 Sun Aug 10 11:12:44 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('question.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('question.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">question.txt</font></a></td> <td> A 212 Fri Jul 4 19:46:29 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('records.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('records.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">records.txt</font></a></td> <td> A 923 Wed Jul 2 01:16:39 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('records2.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('records2.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">records2.txt</font></a></td> <td> A 6248 Tue Jul 29 23:09:39 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('roommate.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('roommate.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">roommate.txt</font></a></td> <td> A 1060 Sun Aug 3 02:12:56 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload('uni.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/txt.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload('uni.txt')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black">uni.txt</font></a></td> <td> A 292 Wed Jul 30 22:03:45 2008</td></tr><tr><td><a onClick="javascript: if (ConfirmDownload(' 59616 blocks o')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><img src="../style/fex/59616blockso.png" /></a></td> <td style="width:270px"><a onClick="javascript: if (ConfirmDownload(' 59616 blocks o')) {downloadfile.download.value = value; downloadfile.submit();}" style="cursor:pointer;"><font color="black"> 59616 blocks o</font></a></td> <td>f size 8388608. 37454 blocks available</td></tr></table></pre> <div style="margin: 20px 15px 10px 15px; text-align:center;"><i>There is no File in this Directory</i></div> <input type=hidden name=folder value="/"> </form> [/color] [color=red]<form id=downloadfile name=downloadfile action="test.php" method="POST"> <input type=hidden name=download value="/"> <input type=hidden name=submit value="submit"> </form> [/color] [color=red]<form id=actions name=actions action="/cgi-bin/smbclient.cgi" method="POST" enctype="multipart/form-data"> <input type=hidden name=folder value="/"> </form> [/color] <p class="bottomlinks"><a href="#">Bottom link 1</a> | <a href="#">Bottom link 2</a> | <a href="#">Bottom link 3</a> | <a href="#">Bottom link 4</a> | <a href="#">Bottom link 5</a> | <a href="#">Bottom link 6</a></p> </div> <p class="footer">Copyright © 2010 <a href="index.html">Ted Chou</a><br /> </div> </body> </html> Thanks,
-
Hi, I am trying to get this submit a href but doesnt seem to work: <% if [ -z $OPEN ] ; then OPEN="[color=red]<a href=\"javascript: if (ConfirmDownload('$FILENAME')) {setValue('$FILENAME'); downloadfile.submit();}\" style=\"cursor:pointer;\">"[/color] fi %> <script language="JavaScript"> function setValue(value){ folderlist.folder.value = value; downloadfile.download.value = value; actions.folder.value = value; return true; } function ConfirmDownload(filename){ return confirm ('Download file ' + filename + ' ?'); } </script> <form id=downloadfile name=downloadfile action="test.php" method="POST"> <input type=hidden name=download value="<%= ${CURDIR:-/} %>"> [color=red]<input type=hidden name=submit value="submit">[/color] </form> When I tried pushing the submit button, it does try to load the post page, but using the a href does not. Thanks, Ted