if($r['access'] == 1) { $r['infobox'] = 1; $r['text'] = substr($r['text'],0,$r['cut']); $r['text'] .= '... <a href="'.URL.'cart/?'.$r['product'].'=1" class="b">BUY ACCESS TO ARTICLE TO VIEW</a>'; $this->tpl->assign('infbox1',PG_SAMPLE); $this->tpl->assign('infbox2','Please <a href='.URL.'cart/?'.$r['product'].'=1>make payment</a> and become a member to get the missing part'); } else { $r['infobox'] = 1; $r['text'] = substr($r['text'],0,$r['cut']); $r['text'] .= '... <a href="'.URL.'cart/?'.$r['product'].'=1" class="b">BUY ACCESS TO ARTICLE TO VIEW</a>'; $this->tpl->assign('infbox1',PG_SAMPLE); $this->tpl->assign('infbox2','Please <a href='.URL.'cart/?'.$r['product'].'=1>make payment</a> and become a member to get the missing part'); } } }
aby nie trzeba bylo 2 razy powtarzac:
$r['infobox'] = 1; $r['text'] = substr($r['text'],0,$r['cut']); $r['text'] .= '... <a href="'.URL.'cart/?'.$r['product'].'=1" class="b">BUY ACCESS TO ARTICLE TO VIEW</a>'; $this->tpl->assign('infbox1',PG_SAMPLE); $this->tpl->assign('infbox2','Please <a href='.URL.'cart/?'.$r['product'].'=1>make payment</a> and become a member to get the missing part');
jakies koncepcje?