protected static function setUpAffFormIfNotExist(DbSimple_Interface $db) { if (!$db->selectCell("SELECT COUNT(*) FROM ?_saved_form WHERE type=?", 'aff')) { $db->query("INSERT INTO ?_saved_form (title, comment, type, fields)\n VALUE (?a)", array('Affiliate Signup Form', '', 'aff', '[{"id":"name","class":"name","hide":"1"},{"id":"email","class":"email","hide":true},{"id":"login","class":"login","hide":true},{"id":"password","class":"password","hide":true},{"id":"address","class":"address","hide":"1","config":{"fields":{"street":1,"city":1,"country":1,"state":1,"zip":1}}},{"id":"payout","class":"payout"}]')); } }
protected static function setUpSubuserProfileFormIfNotExist(DbSimple_Interface $db) { if (!$db->selectCell("SELECT COUNT(*) FROM ?_saved_form WHERE type=?", self::SAVED_FORM_TYPE)) { $db->query("INSERT INTO ?_saved_form (title, comment, type, fields)\n SELECT 'Subuser Profile Form', 'subuser profile form', ?, fields\n FROM ?_saved_form WHERE type=?", self::SAVED_FORM_TYPE, SavedForm::T_PROFILE); } }