function get_profile_data($users_data) { $facewall_trunkwords = 7; $facewall_maxlength = 8; $out_data = array(); $viewer_uid = 0; if (!empty(PA::$login_uid)) { $viewer_uid = PA::$login_uid; } $i = 0; foreach ($users_data as $user) { $u = new User(); $u->load((int) $user['user_id']); $profile_data = User::load_user_profile($user['user_id'], $viewer_uid); $profile_data = sanitize_user_data($profile_data); $out_data[$i]['display_name'] = $u->display_name; $out_data[$i]['user_url'] = url_for('user_blog', array('login' => urlencode($user['login_name']))); $out_data[$i]['nickname'] = strlen($user['login_name']) > $facewall_maxlength ? substr($user['login_name'], 0, $facewall_trunkwords) . ' ...' : $user['login_name']; $out_data[$i]['location'] = field_value(@$profile_data['city'], ' '); $age = ' '; if (!empty($profile_data['dob'])) { $age = convert_birthDate2Age($profile_data['dob']); } $out_data[$i]['age'] = $age; $out_data[$i]['gender'] = field_value(@$profile_data['sex'], ' '); $out_data[$i]['effect']['event'] = 'baloon.say'; if (empty($profile_data['sub_caption'])) { $profile_data['sub_caption'] = 'Hi.'; } $out_data[$i]['effect']['shoutout'] = $profile_data['sub_caption']; $i++; } return $out_data; }
function form_is_posted() { return strcmp(field_value('posted'), 'yes') == 0; }
//adding location to the xml $location = $xml_obj->createElement("location"); $location->appendChild($xml_obj->createTextNode(field_value(@$profile_data['city'], ' '))); $buddy->appendChild($location); //adding age to the xml $age = $xml_obj->createElement("age"); //$gender->appendChild($xml_obj->createTextNode(field_value($profile_data['sex'], 'Not Specified'))); $Age = ' '; if (!empty($profile_data['dob'])) { $Age = convert_birthDate2Age($profile_data['dob']); } $age->appendChild($xml_obj->createTextNode($Age)); $buddy->appendChild($age); //adding gender to the xml $gender = $xml_obj->createElement("sex"); $gender->appendChild($xml_obj->createTextNode(field_value(@$profile_data['sex'], ' '))); //$gender->appendChild($xml_obj->createTextNode('M')); $buddy->appendChild($gender); //adding effect to the xml $effect = $xml_obj->createElement("effect"); $event = $xml_obj->createElement("event"); $event->appendChild($xml_obj->createTextNode('baloon.say')); $effect->appendChild($event); $shoutout = $xml_obj->createElement("shoutout"); if (empty($profile_data['sub_caption'])) { $profile_data['sub_caption'] = 'Hi.'; } $shoutout->appendChild($xml_obj->createTextNode($profile_data['sub_caption'])); $effect->appendChild($shoutout); $buddy->appendChild($effect); $buddylist->appendChild($buddy);
<?php } else { echo __('No image selected.'); } ?> </div> </div> <div class="field_medium"> <h4><label for="upload_desk_image"><span class="required"> * </span> <?php echo __("Upload Image"); ?> </label></h4> <input type="file" class="text long" id="network_image" name="network_image" /> <input type="hidden" name="current_network_image" value="<?php echo field_value($networks_data['network_image'], ''); ?> "> <div class="field_text"> <?php echo __("Uploaded image will be displayed at 193 pixels by 67 pixels"); ?> . </div> </div> </fieldset> <div class="button_position"> <input type="submit" name="video_tours_submit" value="<?php echo __("Save Network of the Moment"); ?>
</div> <div class="row"> <label><span>User Name</span>: <input name="user" type="text" value="<?php echo field_value('user'); ?> " /></label> </div> <div class="row"> <label><span>Password</span>: <input name="password" type="text" value="<?php echo field_value('password'); ?> " /></label> </div> <div class="row"> <label><span>Table Prefix</span>: <input name="prefix" type="text" value="<?php echo field_value('prefix'); ?> " /></label> </div> <div class="row"> <label><span>Charset</span>: <select name="charset"><option>utf8</option></select></label> </div> </fieldset> <p align="center"><input type="submit" name="post_config" value="submit" /></p> </form> <?php } ?> <?php
?> </label></h4> <input type="text" class"text longer" id="featured_video_url" name="featured_video_url" value="<?php echo field_value(@$networks_data['featured_video_url'], field_value(@$_POST['featured_video_url'], '')); ?> " /> <br> The URL for the featured video </div> <div class="field_medium"> <h4><label for="description"><span class="required"> * </span> <?php echo __("Featured Business ID"); ?> </label></h4> <input type="text" class"text longer" id="featured_business_id" name="featured_business_id" value="<?php echo field_value(@$networks_data['featured_business_id'], field_value(@$_POST['featured_business_id'], '')); ?> " /> <br> The ID for the featured business </div> </fieldset> <div class="button_position"> <input type="submit" name="video_tours_submit" value="<?php echo __("Save Showcase Module"); ?> " /> </div> <?php echo $config_navigation_url;
</div> <div class="field_medium"> <h4><label for="upload_desk_image"><?php echo __("Upload Image"); ?> </label></h4> <input type="file" class="text long" id="network_image_<?php echo $counter; ?> " name="network_image_<?php echo $counter; ?> " /> <input type="hidden" name="current_network_image[]" value="<?php echo field_value($networks_data[$counter]['network_image'], ''); ?> "> <div class="field_text"> <?php echo __("Uploaded images will be displayed at 145 pixels by 145 pixels."); ?> </div> </div> </fieldset> <?php } ?> <div class="button_position">
</div> </fieldset> <br/> <?php } else { ?> <div class="well"> <div class="field"> <label><?php echo ucfirst($data); ?> </label> <div> <?php echo field_value($data); ?> </div> </div> </div> <br/> <?php } } ?> </div> <div class="text-center"> <input type="submit" value="save"/> </div> </form> </div>