WELLL, not sure what did it as I tried a lot of different things, but I do honestly believe the culprit lied somewhere in the redirect statement. After I updated the code with some specific redirect coding, I no longer get the error, and believe me, I tried every which way to get the error to show it's face!
Thanks to KK for your diligent efforts and solid consistent help in solving these problems. Below is the relevant code that works:
Thanks to KK for your diligent efforts and solid consistent help in solving these problems. Below is the relevant code that works:
- Code: Select all
<section id="login">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Login / Register</h2>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 text-center">
<p class="contact text-muted">
</div>
</div>
<div class="row">
<div class="col-lg-12">
<!-- now the real work -->
<cms:if k_logged_in >
<!-- this 'login' template also handles 'logout' requests. Check if this is so -->
<cms:set action="<cms:gpc 'act' method='get'/>" />
<cms:if action='logout' >
<cms:process_logout />
<cms:else />
<cms:redirect 'daily.php' />
</cms:if>
<cms:else />
<!-- show the login form -->
<h1>Login</h1>
<cms:form method='post' name='login' anchor='1'>
<cms:if k_success >
<!--
The 'process_login' tag below expects fields named
'k_user_name', 'k_user_pwd' and (optionally) 'k_user_remember', 'k_cookie_test'
in the form
-->
<cms:process_login redirect='0' />
<cms:if k_success>
<cms:php>
global $AUTH, $CTX;
$CTX->set( 'my_user_access_level', $AUTH->user->access_level, 'global' );
</cms:php>
<cms:if my_user_access_level='10'>
<cms:redirect "<cms:show k_admin_link /><cms:show k_admin_page />" />
<cms:else />
<cms:redirect k_site_link />
</cms:if>
</cms:if>
</cms:if>
<cms:if k_error >
<h3><font color='red'><cms:show k_error /></font></h3>
</cms:if>
Email: <br/>
<cms:input type='text' name='k_user_name' /> <br/>
Password: <br />
<cms:input type='password' name='k_user_pwd' /> <br/>
<!-- if 'remember me' function is not required, the following checkbox can be omitted -->
<cms:input type='checkbox' name='k_user_remember' opt_values='Remember me=1' /> <br/>
<input type="hidden" name="k_cookie_test" value="1" />
<input type="submit" value="Login" name="submit"/>
</cms:form>
<!-- optionally display links for 'Create account' and 'Lost password' -->
<br />
<cms:if k_user_registration_template >
Not signed up yet? <a href="<cms:link k_user_registration_template />" />Create an account here.</a> <br>
</cms:if>
<cms:if k_user_lost_password_template >
Forgot your password? <a href="<cms:link k_user_lost_password_template />" />Click here.</a> <br>
</cms:if>
</cms:if>
</div>
</div>
</div>
</section>