Miva - Custom Maintenance Mode Redirect
<mvt:comment><!-- Custom Maintenance Mode --></mvt:comment>
<mvt:assign name="g.auth_code" value="'SUPERSECRECT'" />
<mvt:if expr="g.auth EQ g.auth_code">
<mvt:if expr="l.settings:page:code EQ 'MNTN'">
<mvt:assign name="l.header" value="miva_output_header( 'Status', '302 Found' )" />
<mvt:assign name="l.header" value="miva_output_header( 'Location', l.settings:urls:SFNT:auto )" />
</mvt:if>
<mvt:else>
<mvt:item name="customfields" param="Read_Basket('auth', g.auth)" />
</mvt:if>
<mvt:assign name="l.settings:store:mnt_ips_array" value="miva_array_deserialize( l.settings:store:mnt_ips )" />
<mvt:assign name="l.settings:store:mnt_ips_found" value="miva_array_find( s.remote_addr, l.settings:store:mnt_ips_array, 0 )" />
<mvt:if expr="',' $ s.remote_addr $ ',' CIN ',' $ l.settings:store:mnt_ips $ ','">
<mvt:assign name="g.auth" value="g.auth_code" />
</mvt:if>
<mvt:if expr="g.auth EQ g.auth_code">
<mvt:item name="customfields" param="Write_Basket('auth', g.auth)" />
<mvt:elseif expr="l.settings:page:code NE 'MNTN'">
<mvt:assign name="l.header" value="miva_output_header( 'Status', '302 Found' )" />
<mvt:assign name="l.header" value="miva_output_header( 'Location', l.settings:urls:MNTN:auto_sep $ 'redirected=1' )" />
</mvt:if>