From 5d474177113f563c5c4d299485e0edb27d061f8a Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 15 Nov 2010 21:06:44 -0800 Subject: more view cleanup --- include/contact_selectors.php | 69 +++++++++++++++++++++++++++++++++++++++++++ include/profile_selectors.php | 42 ++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 include/contact_selectors.php create mode 100644 include/profile_selectors.php (limited to 'include') diff --git a/include/contact_selectors.php b/include/contact_selectors.php new file mode 100644 index 000000000..ac1e38e4f --- /dev/null +++ b/include/contact_selectors.php @@ -0,0 +1,69 @@ +\r\n"; + + $r = q("SELECT `id`, `profile-name` FROM `profile` WHERE `uid` = %d", + intval($_SESSION['uid'])); + + if(count($r)) { + foreach($r as $rr) { + $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : ""); + $o .= "\r\n"; + } + } + $o .= "\r\n"; + return $o; +} + + +function contact_reputation($current) { + + $o = ''; + $o .= "\r\n"; + return $o; +} + + +function contact_poll_interval($current) { + + $o = ''; + $o .= '\r\n"; + return $o; +} diff --git a/include/profile_selectors.php b/include/profile_selectors.php new file mode 100644 index 000000000..335f292dc --- /dev/null +++ b/include/profile_selectors.php @@ -0,0 +1,42 @@ +"; + foreach($select as $selection) { + $selected = (($selection == $current) ? ' selected="selected" ' : ''); + $o .= ""; + } + $o .= ''; + return $o; +} + +function sexpref_selector($current="",$suffix="") { + $o = ''; + $select = array('', t('Males'), t('Females'), t('Bisexual'), t('Autosexual'), t('Abstinent'), t('Virgin'), t('Nonsexual')); + + $o .= "'; + return $o; +} + + +function marital_selector($current="",$suffix="") { + $o = ''; + $select = array('', t('Single'), t('Lonely'), t('Available'), t('Unavailable'), t('Dating'), t('Unfaithful'), t('Sex Addict'), t('Friends'), t('Friends/Benefits'), t('Casual'), t('Engaged'), t('Married'), t('Partners'), t('Cohabiting'), t('Happy'), t('Not Looking'), t('Swinger'), t('Betrayed'), t('Separated'), t('Unstable'), t('Divorced'), t('Widowed'), t('Uncertain'), t('Complicated'), t('Don\'t care'), t('Ask me') ); + + $o .= "'; + return $o; +} -- cgit v1.2.3