/** * Returns the publication subscription time unit name. * * @param int $p_languageId * @return string */ public function getTimeUnitName($p_languageId = null) { $languageId = is_null($p_languageId) ? $this->m_data['IdDefaultLanguage'] : $p_languageId; $timeUnit = new TimeUnit($this->m_data['TimeUnit'], $languageId); if (!$timeUnit->exists()) { $timeUnit = new TimeUnit($this->m_data['TimeUnit'], 1); } return $timeUnit->getName(); }
<?php camp_html_display_msgs(); ?> <P> <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="3" class="table_list"> <TR class="table_list_header"> <TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Country<BR><SMALL>(click to edit)</SMALL>"); ?> </B></TD> <td colspan="2"><?php putGS('Default time period'); ?> (<?php p($pubTimeUnit->getName()); ?> ):</td> <TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Delete"); ?> </B></TD> </TR> <tr class="table_list_header"> <TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("trial subscription"); ?> </B></TD> <TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("paid subscription"); ?>
foreach ($countries as $country) { ?> <OPTION VALUE="<?php p(htmlspecialchars($country->getCode())); ?>"><?php p(htmlspecialchars($country->getName())); ?> <?php } ?> </SELECT> </TD> </TR> <tr> <td colspan="2" align="left"><b><?php putGS('Default time period'); ?>:</b></td> </tr> <TR> <TD ALIGN="RIGHT" >- <?php putGS("trial subscription"); ?>:</TD> <TD> <INPUT TYPE="TEXT" class="input_text" NAME="cTrialTime" VALUE="1" SIZE="5" MAXLENGTH="5" alt="number|0|1|100000" emsg="<?php putGS("You must input a number greater than 0 into the $1 field.", """.getGS("trial subscription")."""); ?>"> <?php p($pubTimeUnit->getName()); ?> </TD> </TR> <TR> <TD ALIGN="RIGHT" >- <?php putGS("paid subscription"); ?>:</TD> <TD> <INPUT TYPE="TEXT" class="input_text" NAME="cPaidTime" VALUE="1" SIZE="5" MAXLENGTH="5" alt="number|0|1|100000" emsg="<?php putGS("You must input a number greater than 0 into the $1 field.", """.getGS("paid subscription")."""); ?>"> <?php p($pubTimeUnit->getName()); ?> </TD> </TR> <TR> <TD COLSPAN="2"> <DIV ALIGN="CENTER"> <INPUT TYPE="submit" class="button" NAME="Save" VALUE="<?php putGS('Save'); ?>"> <!--<INPUT TYPE="button" class="button" NAME="Cancel" VALUE="<?php putGS('Cancel'); ?>" ONCLICK="location.href='/admin/pub/deftime.php?Pub=<?php p($Pub); ?>&Language=<?php p($Language); ?>'">--> </DIV>
?> <p> <TABLE class="action_buttons"> <TR> <TD><A HREF="countryadd.php?Pub=<?php p($Pub); ?>&Language=<?php p($Language); ?>" ><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/add.png" BORDER="0"></A></TD> <TD><A HREF="countryadd.php?Pub=<?php p($Pub); ?>&Language=<?php p($Language); ?>" ><B><?php putGS("Set subscription settings for a country"); ?></B></A></TD> </TR> </TABLE> <?php camp_html_display_msgs(); ?> <P> <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="3" class="table_list"> <TR class="table_list_header"> <TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Country<BR><SMALL>(click to edit)</SMALL>"); ?></B></TD> <td colspan="2"><?php putGS('Default time period'); ?> (<?php p($pubTimeUnit->getName()); ?>):</td> <TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php putGS("Delete"); ?></B></TD> </TR> <tr class="table_list_header"> <TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("trial subscription"); ?></B></TD> <TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php putGS("paid subscription"); ?></B></TD> </tr> <?php $color = 0; foreach ($defaultTimes as $time) { $country = new Country($time->getCountryCode(), $Language); ?> <TR <?php if ($color) { $color=0; ?>class="list_row_even"<?php } else { $color=1; ?>class="list_row_odd"<?php } ?>> <TD> <A HREF="/<?php p($ADMIN); ?>/pub/editdeftime.php?Pub=<?php p($Pub); ?>&CountryCode=<?php p($time->getCountryCode()); ?>&Language=<?php p($Language); ?>"><?php p(htmlspecialchars($country->getName())); ?> (<?php p(htmlspecialchars($country->getCode())); ?>)</A> </TD>