123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <?php
- if ($logedin){
- $info = api_get("accounts/verify_credentials");
- if($info['error']){
- header('Location: ./logout');
- }
- }
- ?>
- <div class='element'>
- <div class='avatar' style='height:0px;'></div>
- <div class='post' style='text-align:left;'>
- <div style='padding:15px; width:90%; text-align:left; display:inline-block;' id="settings">
- <h1><span class='fontello' style='font-size:inherit;'></span> Settings</h1>
- <form method='post' enctype="multipart/form-data">
- <input type='hidden' name='action' value='settings'>
- <br>
- <?php if ($logedin): ?>
-
- <hr>
- <h1><span class='fontello' style='font-size:inherit;'></span> Account</h1>
- <h2>Username</h2>
- <div class='setting'>
- <input type='text' name='username' value='<?php echo $info['display_name']; ?>'>
- </div>
-
- <h2>Bio</h2>
- <div class='setting'>
- <textarea name='bio' style='width:90%; height:100px'><?php
- echo trim(strip_tags(str_replace(array("<br/>","<br />"),"\n",$info['note'])));
- ?></textarea>
- </div>
-
- <h2>Avatar</h2>
- <div class='setting'>
- <div class='avatar' style='height:80px; background-image:url("<?php echo $info['avatar']; ?>"); background-size:80px; margin-top:0px !important; margin-left:0px !important; display:block;'></div>
- <div style='display:block; clear:both; width:70%; overflow:hidden;'><input type='file' name='avatar'></div>
- </div>
-
- <div style='clear:both;'></div>
- <h2>Header</h2>
- <div class='setting' style='clear:both;'>
- <div style='height:150px; width:90%; background-image:url("<?php echo $info['header']; ?>"); background-size:cover; background-repeat: no-repeat; margin-top:0px !important; margin-left:0px !important;'></div>
- <div style='display:block; clear:both; width:70%; overflow:hidden;'><input type='file' name='header'></div>
- </div>
- <br>
- <?php endif; ?>
-
- <h1><span class='fontello' style='font-size:inherit;'></span> Timeline</h1>
- <hr>
- <?php if ($logedin): ?>
- <h2>Default post vsibility</h2>
- <div class="setting">
- <select name='defscope' id='scope'>
- <option value="1" <?php echo ($user_settings['defscope'] == '1' ? "selected" : ""); ?>> Public</option>
- <option value="2" <?php echo ($user_settings['defscope'] == '2' ? "selected" : ""); ?>> Unlisted</option>
- <option value="3" <?php echo ($user_settings['defscope'] == '3' ? "selected" : ""); ?>> Private</option>
- <option value="4" <?php echo ($user_settings['defscope'] == '4' ? "selected" : ""); ?>> Direct</option>
- </select>
- </div>
-
- <h2>Show replies</h2>
- <div class='setting'>
- <select name="replies">
- <option value="on" <?php echo ($user_settings['replies'] == 'on' ? "selected" : ""); ?>>All</option>
- <option value="off" <?php echo ($user_settings['replies'] == 'off' ? "selected" : ""); ?>>Only to people i follow</option>
- </select>
- </div>
- <?php endif; ?>
- <h2>Show text-only posts</h2>
- <div class='setting'>
- <input type='radio' name='text' id='textOn' value='on' style='display:none;' <?php echo ($user_settings['text'] == 'on' ? "checked" : ""); ?>>
- <label for='textOn'>Yes</label>
- <input type='radio' name='text' id='textOff' value='off' style='display:none;' <?php echo ($user_settings['text'] == 'off' ? "checked" : ""); ?>>
- <label for='textOff'>No</label>
- </div>
- <br><br>
- <h2>Show reblogs</h2>
- <div class='setting'>
- <input type='radio' name='reblog' id='reblogOn' value='on' style='display:none;' <?php echo ($user_settings['reblog'] == 'on' ? "checked" : ""); ?>>
- <label for='reblogOn'>Yes</label>
- <input type='radio' name='reblog' id='reblogOff' value='off' style='display:none;' <?php echo ($user_settings['reblog'] == 'off' ? "checked" : ""); ?>>
- <label for='reblogOff'>No</label>
- </div>
- <br><br>
- <h2>Unroll Content Warnings</h2>
- <div class='setting'>
- <input type='radio' name='unrollcw' id='cwshow' value='on' style='display:none;' <?php echo ($user_settings['unrollcw'] == 'on' ? "checked" : ""); ?>>
- <label for='cwshow'>True</label>
- <input type='radio' name='unrollcw' id='cwhide' value='off' style='display:none;' <?php echo ($user_settings['unrollcw'] == 'off' ? "checked" : ""); ?>>
- <label for='cwhide'>False</label>
- </div>
- <br><br>
- <?php if ($logedin): ?>
- <h2>Muted words</h2>
- <span>One per line</span>
- <div class='setting'>
- <textarea name='mtwords' style='width:85%;'><?php
- foreach($user_settings['mtwords'] as $word){
- echo (empty($word) ? "" : trim($word)."\n");
- }
- ?></textarea>
- </div>
-
- <h2>Followed hashtags</h2>
- <span>One per line</span>
- <div class='setting'>
- <textarea name='fhtags' style='width:85%;'><?php
- foreach($user_settings['fhtags'] as $word){
- echo (empty($word) ? "" : trim($word)."\n");
- }
- ?></textarea>
- </div>
- <?php endif; ?>
-
- <br>
-
- <h1><span class='fontello' style='font-size:inherit;'></span> Attachments</h1>
- <hr>
- <h2>Hide Attachments, show a link instead.</h2>
- <div class='setting'>
- <input type='radio' name='attach' id='a_hide' value='off' style='display:none;' <?php echo ($user_settings['attach'] == 'off' ? "checked" : ""); ?>>
- <label for='a_hide'>Yes</label>
- <input type='radio' name='attach' id='a_show' value='on' style='display:none;' <?php echo ($user_settings['attach'] == 'on' ? "checked" : ""); ?>>
- <label for='a_show'>No</label>
- </div>
- <br><br>
- <h2>Sensitive Media</h2>
- <div class='setting'>
- <input type='radio' name='explicit' id='hide' value='hide' style='display:none;' <?php echo ($user_settings['explicit'] == 'hide' ? "checked" : ""); ?>>
- <label for='hide'>Hide</label>
- <input type='radio' name='explicit' id='blur' value='blur' style='display:none;' <?php echo ($user_settings['explicit'] == 'blur' ? "checked" : ""); ?>>
- <label for='blur'>Blur</label>
- <input type='radio' name='explicit' id='show' value='off' style='display:none;' <?php echo ($user_settings['explicit'] == 'off' ? "checked" : ""); ?>>
- <label for='show'>Show</label>
- </div>
- <br><br>
- <h2>Loop videos</h2>
- <div class='setting'>
- <input type='radio' name='videoloop' id='loopOn' value='on' style='display:none;' <?php echo ($user_settings['videoloop'] == 'on' ? "checked" : ""); ?>>
- <label for='loopOn'>Yes</label>
- <input type='radio' name='videoloop' id='loopOff' value='off' style='display:none;' <?php echo ($user_settings['videoloop'] == 'off' ? "checked" : ""); ?>>
- <label for='loopOff'>No</label>
- </div>
- <br><br>
- <br><br>
- <h1><span class='fontello' style='font-size:inherit;'></span> Notifications</h1>
- <hr>
- <div class='setting'>
- <p>Select types of notifications you want to see:</p>
- <input type='checkbox' name='notif[fav]' id='fav' style='display:none;' <?php echo (str_split($user_settings['notif'])[0] == '1' ? "checked" : ""); ?>>
- <label for='fav'>Faves</label>
- <input type='checkbox' name='notif[rt]' id='rt' style='display:none;' <?php echo (str_split($user_settings['notif'])[1] == '1' ? "checked" : ""); ?>>
- <label for='rt'>Reblogs</label>
- <input type='checkbox' name='notif[mnt]' id='mnt' style='display:none;' <?php echo (str_split($user_settings['notif'])[2] == '1' ? "checked" : ""); ?>>
- <label for='mnt'>Mentions</label>
- <input type='checkbox' name='notif[follow]' id='follow' style='display:none;' <?php echo (str_split($user_settings['notif'])[3] == '1' ? "checked" : ""); ?>>
- <label for='follow'>Follow</label>
- </div>
- <br><br>
- <br><br>
- <h1><span class='fontello' style='font-size:inherit;'></span> User Interface</h1>
- <hr>
- <h2>Theme.</h2>
- <select name='theme' onChange='themecheck(this)'>
- <?php
- echo "<option value='default' ".($user_settings['theme'] == "default" ? "selected" : "").">default</option>";
- foreach(themes("list") as $name){
- echo "<option value='$name' ".($user_settings['theme'] == $name ? "selected" : "").">$name</option>";
- }
- echo "<option value='custom' ".($user_settings['theme'] == "custom" ? "selected" : "").">custom</option>";
- ?>
- </select>
-
- <div id="customtheme"<?php echo ($user_settings['theme'] == "custom" ? "" : "style='display:none;'");?>>
- <fieldset>
- <legend>Custom Colors</legend>
- Foreground:<br>
- <input type="color" name="fg" value="#<?php echo (!empty($theme) ? $theme['fg'] : "#ffffff");?>"><br><br>
- Background:<br>
- <input type="color" name="bg" value="#<?php echo (!empty($theme) ? $theme['bg'] : "#2b475d");?>"><br><br>
- Text Color:<br>
- <input type="color" name="tx" value="#<?php echo (!empty($theme) ? $theme['tx'] : "#000000");?>"><br><br>
- Link Color:<br>
- <input type="color" name="lc" value="#<?php echo (!empty($theme) ? $theme['lc'] : "#4682b4");?>"><br><br>
- Border Color:<br>
- <input type="color" name="bc" value="#<?php echo (!empty($theme) ? $theme['bc'] : "#ffffff");?>"><br><br>
- Border Width:<br>
- <input type="text" name="bw" value="<?php echo (!empty($theme) ? $theme['bw'] : "0");?>"><br><br>
- Border Radius:<br>
- <input type="text" name="br" value="<?php echo (!empty($theme) ? $theme['br'] : "3");?>"><br><br>
- Drop Shadow Size:<br>
- <input type="text" name="dr" value="<?php echo (!empty($theme) ? $theme['dr'] : "0");?>"><br><br>
- </fieldset>
- </div>
- <br>
- <br><br>
- <br><br>
- <input type="submit" value="Save" id="send">
- </form>
- </div>
- </div>
- </div>
- <?php
- if ($logedin){
- include ("modules/lists.php");
- }
- ?>
|