UPDATE site_ctr SET shows = shows + 1, ctr = (views/(shows+1)) WHERE id IN ($ids);
function checkStr( $sInput ) {
$sRegexp = '~^(:?%u00[0-9][0-9a-zA-Z])++$~';
return preg_match($sRegexp, $sInput);
}
assert('checkStr("%u003c%u0073%u0063%u0072%u0069%u0070%u0074%u003e")');
assert('checkStr("%u003c")');
assert('checkStr("%u0046%u005c")');
assert('checkStr("asd")==false');
assert('checkStr("%a003da")==false');
assert('checkStr("%k41ad")==false');
assert('checkStr("Бла бла бла")==false');
assert('checkStr("%u003c%u0073%u0063%")==false');
assert('checkStr("%u003c%u0073ASFQ%u0063")==false');
add action=mark-connection chain=input comment="mark input gw0" in-interface=\
bridge-gw0 new-connection-mark=to_astral0 passthrough=no
add action=mark-connection chain=input comment="mark input gw1" in-interface=\
bridge-gw1 new-connection-mark=to_astral1 passthrough=no
add action=mark-routing chain=output connection-mark=to_astral0 \
new-routing-mark=to_astral0 passthrough=no
add action=mark-routing chain=output connection-mark=to_astral1 \
new-routing-mark=to_astral1 passthrough=no
add action=mark-connection chain=forward connection-mark=no-mark \
in-interface=bridge-gw0 new-connection-mark=to_astral0 passthrough=no
add action=mark-connection chain=forward connection-mark=no-mark \
in-interface=bridge-gw1 new-connection-mark=to_astral1 passthrough=no
add action=jump chain=prerouting comment="process home connmark" \
connection-mark=no-mark dst-address-type=!local in-interface=bridge-home \
jump-target=prerouting_wan
add action=jump chain=prerouting comment="process dmz connmark" \
connection-mark=no-mark dst-address-type=!local in-interface=bridge-dmz \
jump-target=prerouting_wan
add action=jump chain=prerouting comment="set routing marks from home" \
connection-mark=!no-mark in-interface=bridge-home jump-target=\
prerouting_markroute
add action=jump chain=prerouting comment="set routing marks from dmz" \
connection-mark=!no-mark in-interface=bridge-dmz jump-target=\
prerouting_markroute
add action=mark-connection chain=prerouting_wan comment="use only gw0 list" \
connection-mark=no-mark new-connection-mark=to_astral0 src-address-list=\
wan_only_gw0
add action=mark-connection chain=prerouting_wan comment="use only gw1 list" \
connection-mark=no-mark new-connection-mark=to_astral1 src-address-list=\
wan_only_gw1
add action=mark-connection chain=prerouting_wan comment="use prefer gw0 list" \
connection-mark=no-mark new-connection-mark=to_astral0 src-address-list=\
wan_failover_prefer_gw0
add action=mark-connection chain=prerouting_wan comment="use prefer gw1 list" \
connection-mark=no-mark new-connection-mark=to_astral1 src-address-list=\
wan_failover_prefer_gw1
add action=mark-connection chain=prerouting_wan comment=PCC connection-mark=\
no-mark new-connection-mark=to_astral0 per-connection-classifier=\
both-addresses:2/0
add action=mark-connection chain=prerouting_wan comment=PCC connection-mark=\
no-mark new-connection-mark=to_astral1 per-connection-classifier=\
both-addresses:2/1
add action=mark-routing chain=prerouting_markroute comment=\
"mark packet to_astral0" connection-mark=to_astral0 new-routing-mark=\
to_astral0
add action=mark-routing chain=prerouting_markroute comment=\
"mark packet to_astral1" connection-mark=to_astral1 new-routing-mark=\
to_astral1