function display_mobile_breakdown($id) { if ($id == 1) { $none_label = "--Group By--"; } else { $none_label = "--Then Group By--"; } $name = "user_mobile_breakdown_" . $id; $pref = BTAuth::user()->getPref($name); $opts = array(array('value' => "0", 'label' => $none_label), array('value' => "devices.brand", 'label' => "Brand"), array('value' => "devices.type", 'label' => "Device Type"), array('value' => "devices.os", 'label' => "OS"), array('value' => "devices.os_version", 'label' => "OS Version"), array('value' => "devices.browser", 'label' => "Browser"), array('value' => "devices.browser_version", 'label' => "Browser Version"), array('value' => "orgs.name", 'label' => "Carrier/ISP")); if ($id == 1) { echo '<label>Mobile Breakdown</label>'; } else { echo "<label> </label>"; } BTForm::createSelect($name, $opts, $pref); }
<div class="row"> <label class="tooltip" title="Payout">Payout</label> <div> <input type="text" class="required" value="<?php echo $offer->payout; ?> " name="payout" /> <br /> </div> </div> <div class="row"> <label for="d1_textfield"> <strong>Network</strong> </label> <div> <?php BTForm::createSelect('aff_network_id', AffNetworkModel::model()->getRows(), @$offer->network->aff_network_id, 'aff_network_id', '', 'name', 'aff_network_id'); ?> </div> </div> </div> <div class="actions"> <div class="right"> <input type="submit" value="Save" /> </div> </div> </form> </div> <script> $(function(){ $("#edit_offer_form").validate();
</tbody> </table> </div> </div> </div> <div style="display: none;" id="add_offer_form_holder" title="Add an Offer"> <form id="add_offer_form" action="" class="full"> <input type="hidden" name="offer_id" id="offer_id"/> <div class="row"> <label for="d1_textfield"> <strong>Network</strong> </label> <div> <?php BTForm::createSelect('aff_network_id', AffNetworkModel::model()->getRows(), null, 'aff_network_id', '', 'name', 'aff_network_id'); ?> </div> </div> <div class="row"> <label for="d1_textfield"> <strong>Offer Name</strong> </label> <div> <input class="required" type="text" name="name" id="name" /> </div> </div> <div class="row"> <label for="d1_textfield"> <strong>Affiliate URL</strong> </label>
if (@$campoffer->offer->offer_id) { ?> <tr class="no_row_borders"> <td style="width: 90px;">Aff Network: </td> <td style="width: 550px;"><?php echo @$campoffer->offer->network->name; ?> <input type="hidden" name="offer_aff_network_id[]" value="<?php echo @$campoffer->offer->aff_network_id; ?> " /></td> <td><img src="/theme/img/icons/16x16/delete.png" onclick="deleteOfferTable(this);" style="cursor: pointer; width: 16px; height: 16px;"></td><td></td> </tr> <?php } else { ?> <tr class="no_row_borders"> <td style="width: 90px;">Aff Network:</td> <td style="width: 550px;"> <?php BTForm::createSelect('offer_aff_network_id[]', AffNetworkModel::model()->getRows(), @$campoffer->offer->aff_network_id, '', '', 'name', 'aff_network_id'); ?> </td> <td><img src="/theme/img/icons/16x16/delete.png" onclick="deleteOfferTable(this);" style="cursor: pointer; width: 16px; height: 16px;"></td><td></td> </tr> <?php } ?> </tbody> </table> </div>