function content_510a429894316($_smarty_tpl) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>更新数据</title> </head> <body> <form action="<?php echo getAppUrl(array(), $_smarty_tpl); ?> /index/save/id/<?php echo $_smarty_tpl->tpl_vars['user']->value['id']; ?> " method="post" name="form1"> <ul> <li>用户名:<input type="test" value="<?php echo $_smarty_tpl->tpl_vars['user']->value['username']; ?> " name="username" /></li> <li>密码:<input type="password" name="password" /></li> <li>重复密码:<input type="password" name="repassword" /></li> </ul> <input type="submit" value="提交" /> </form> </body> </html> <?php }
function content_510a3c1a577a6($_smarty_tpl) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo $_smarty_tpl->tpl_vars['pageTitle']->value; ?> </title> </head> <body> <ul> <?php $_smarty_tpl->tpl_vars['vo'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['vo']->_loop = false; $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['vo']->key => $_smarty_tpl->tpl_vars['vo']->value) { $_smarty_tpl->tpl_vars['vo']->_loop = true; ?> <li><?php echo $_smarty_tpl->tpl_vars['vo']->value['username']; ?> <span><a href="<?php echo getAppUrl(array(), $_smarty_tpl); ?> /Index/delete/id/<?php echo $_smarty_tpl->tpl_vars['vo']->value['id']; ?> ">删除</a></span><span><a href="<?php echo getAppUrl(array(), $_smarty_tpl); ?> /Index/update/id/<?php echo $_smarty_tpl->tpl_vars['vo']->value['id']; ?> ">修改</a></span></li><br> <?php } ?> </ul> </body> </html> <?php }
<?php require_once 'Gdata_OAuth_Helper.php'; require_once 'siteUtils.php'; require_once 'siteConfig.php'; require_once 'dbFuncs.php'; session_start(); require_once 'openIdAuth.php'; $APP_URL = getAppUrl(); $openId = new Gamut_OpenId(); $consumer = new Gdata_OAuth_Helper($CONSUMER_KEY, $CONSUMER_SEC); $dbFuncsObj = new dbFuncs(false); $dbFuncsObj->doConnect(); /** * This switch statement performs selective processing * based on the supplied 'action'. **/ switch (@$_REQUEST['action']) { case 'request_token': $_SESSION['ACCESS_TOKEN'] = $dbFuncsObj->getAccessToken('*****@*****.**'); if (isset($_SESSION['ACCESS_TOKEN'])) { $accessToken = unserialize($_SESSION['ACCESS_TOKEN']); //print $accessToken; $httpClient = $accessToken->getHttpClient($consumer->getOauthOptions()); $emailService = new Zend_Gdata_EMail($httpClient); $emailId = $emailService->getEMailFeed(); print $emailId; renderHTML('User logged-in with access token: <br> <a href="' . getRedirectUrl() . '" >Logout </a>', false); } else { $_SESSION['REQUEST_TOKEN'] = serialize($consumer->fetchRequestToken(implode(' ', $SCOPES), $APP_URL . '?action=' . getActionString('access'))); $consumer->authorizeRequestToken();