Tilføje mulighed for måneder i option boks
Hejsa.Er der en der kan sige hvordan jeg tilføjer muligheden for 3 og 6 måneder i denne scriptblok, lige nu er der kun fra 1-10 år!
if ($subnum == 0) {
$content .= "<tr><td>" . _SUBUSERASK . "</td><td><input type='radio' name='subscription' value='1'> " . _YES . " <input type='radio' name='subscription' value='0' checked> " . _NO . "</td></tr>";
$content .= "<tr><td>" . _SUBPERIOD . "</td><td><select name='subscription_expire'>";
$content .= "<option value='0' selected>" . _NONE . "</option>";
$content .= "<option value='1'>1 "._YEAR."</option>";
$content .= "<option value='2'>2 "._YEARS."</option>";
$content .= "<option value='3'>3 "._YEARS."</option>";
$content .= "<option value='4'>4 "._YEARS."</option>";
$content .= "<option value='5'>5 "._YEARS."</option>";
$content .= "<option value='6'>6 "._YEARS."</option>";
$content .= "<option value='7'>7 "._YEARS."</option>";
$content .= "<option value='8'>8 "._YEARS."</option>";
$content .= "<option value='9'>9 "._YEARS."</option>";
$content .= "<option value='10'>10 "._YEARS."</option>";
$content .= "</select><input type='hidden' name='reason' value='0'></td></tr>";
} elseif ($subnum == 1) {
$content .= "<tr><td>"._UNSUBUSER."</td><td><input type='radio' name='subscription' value='0'> "._YES." <input type='radio' name='subscription' value='1' checked> "._NO."</td></tr>";
$content .= "<tr><td>"._ADDSUBPERIOD."</td><td><select name='subscription_expire'>";
$content .= "<option value='0' selected>"._NONE."</option>";
$content .= "<option value='1'>1 "._YEAR."</option>";
$content .= "<option value='2'>2 "._YEARS."</option>";
$content .= "<option value='3'>3 "._YEARS."</option>";
$content .= "<option value='4'>4 "._YEARS."</option>";
$content .= "<option value='5'>5 "._YEARS."</option>";
$content .= "<option value='6'>6 "._YEARS."</option>";
$content .= "<option value='7'>7 "._YEARS."</option>";
$content .= "<option value='8'>8 "._YEARS."</option>";
$content .= "<option value='9'>9 "._YEARS."</option>";
$content .= "<option value='10'>10 "._YEARS."</option>";
$content .= "</select></td></tr>";
$content .= "<tr><td>"._ADMSUBEXPIREIN."</td><td>";
$rows = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_subscriptions WHERE userid='$chng_uid'"));
$diff = $rows[subscription_expire]-time();
$yearDiff = floor($diff/60/60/24/365);
$diff -= $yearDiff*60*60*24*365;
if ($yearDiff < 1) {
$diff = $rows[subscription_expire]-time();
}
$daysDiff = floor($diff/60/60/24);
$diff -= $daysDiff*60*60*24;
$hrsDiff = floor($diff/60/60);
$diff -= $hrsDiff*60*60;
$minsDiff = floor($diff/60);
$diff -= $minsDiff*60;
$secsDiff = $diff;
if ($yearDiff < 1) {
$rest = "$daysDiff "._SBDAYS.", $hrsDiff "._SBHOURS.", $minsDiff "._SBMINUTES.", $secsDiff "._SBSECONDS."";
} elseif ($yearDiff == 1) {
$rest = "$yearDiff "._SBYEAR.", $daysDiff "._SBDAYS.", $hrsDiff "._SBHOURS.", $minsDiff "._SBMINUTES.", $secsDiff "._SBSECONDS."";
} elseif ($yearDiff > 1) {
$rest = "$yearDiff "._SBYEARS.", $daysDiff "._SBDAYS.", $hrsDiff "._SBHOURS.", $minsDiff "._SBMINUTES.", $secsDiff "._SBSECONDS."";
}
$content .= "<font color='#FF0000'>$rest</font></td></tr>";
$content .= "<tr><td>"._SUBREASON."</td><td><textarea name='reason' cols='70' rows='15'></textarea></td></tr>";