Make a custom module to implement hook_node_access, i will post some code based on a user date field that compares 'today' with this user-date-field and return access deny if dates comparison goes beyond 'today', and another with today+7 days, you will have to adapt this code to your needs; please add in user profile a date field, this field it has to be updated by rules every time a user adds content of your 'special content-type', maybe you will need 2 user-date-fiels, one for each 'special-contentype' if you need help with this last comment please ask.
// replace HOOK with yourmodulename and field machine names
function HOOK_node_access($node, $op, $account) {
$type = is_string($node) ? $node : $node->type;
global $user;
// check if not anonymous
if($user->uid!=0){
//check if not administrator role, admin will have allways access
$user_role = '';
if (in_array('administrator', $user->roles)) {
// do fancy stuff
$user_role = 'administrator';
}
if (!$user_role == 'administrator') {
$user_logged = user_load($user->uid);
$user_date_field = $user_logged->YOUR_USER_DATE_FIELD[LANGUAGE_NONE][0]['value'];
// today date in UNIX date stamp
$today_int = date('U');
// your user_date_field in UNIX time stamp
$date_int = (int)strtotime($user_date_field);
// check if 'today' is > than user_date_field
$diff = $date_int - $today_int;
$diff = round($diff/86400); // diff in days betwen 2 dates
// today comparison
if ($diff >= 0 ) {
// code... user do have access to add/edit content
} else {
// code... retunr access deny 'today' add/edit
if ($type == 'YOUR_CONTENT_TYPE_MACHINE_NAME') {
// if options are update ore cerate content, return access deny
if ($op == 'update' OR $op == 'create') {
return NODE_ACCESS_DENY;
}
}
}
// 1 week comparison
$diff7 = $diff + 7;
if ($diff7 >= 0 ) {
// code... user do have access to add/edit content
} else {
// code... retunr access deny 'today +7 days' add/edit
if ($type == 'YOUR_CONTENT_TYPE_MACHINE_NAME_7') {
// if options are update ore cerate content, return access deny
if ($op == 'update' OR $op == 'create') {
return NODE_ACCESS_DENY;
}
}
}
}
}
}
NOTE, if you do not want to add fields to user profile form, it could be done by adding variables to logged-user by HOOK_entity_property_info_alter(&$info), if this is needed please ask.
EDIT:
please specyfy in your question that is about webforms, so, above code do not apply, i'll leave it, could be usefull for someone else.
what you can do is still keep 'user_date_field', install the following mudules: flags, rules and panels.
I will explain only ‘today’ settings, same thing for ‘1 week settings’, only in this last case you will need another field (or user-variable) to store how many webforms has submitted this user in current week.
Steps:
• enable rules, rules scheduler, flag & panels modules.
• make a user flag ‘user-posted-a-webform’
• in rules:
• make a component, unflag current user (it will be invoked later).
• make a rule, flag user when submit a webform, update 'user_date_field' with site-current-date
• in panels make a page and add your webform, add a rule (inside panles content section) make it visible only if user is NOT flagged.
• Return to your rule, add an action “schedule component evaluation”, choose your component, inside action setting, on ‘scheduled evaluation date’ enter ‘+1 day’.
• Done
COMPONENT unflag-user