PHP to only allow super admin access

So I don't remember the PHP and can't seem to find it. But what is the PHP that checks the current user and if the user isn't super admin they are denied access? Accept I am going to change it so that it just hides some HTML and doesn't echo the error. Is this possible?

  • Brashell

    It won't work. I need to make it so the following can only be seen by super admins and echo isn't an option because of all the quotes.

    <------------------------------------------------------------------------------------------------------------------------------------------------------>

    <div class="setting type_all">
                <div class="setting-label">' . __('Width', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-width" value="650"/>
                <div class="sidenote">'.__('Width in pixels. Input "100%" for total responsivness.', 'dzsvg').'</div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Height', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-height" value="450"/>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Responsive', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-html5responsive">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting styleme">
                <div class="setting-label">' . __('Display Mode', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-displaymode">
                    <option>normal</option>
                </select>
            </div>
            <div class="setting styleme">
                <div class="setting-label">' . __('Video Gallery Skin', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-skin_html5vg">
                    <option>skin_custom</option>
                </select>
                <div class="sidenote">'.__('Skin Custom can be modified via Designer Center.', 'dzsvg') . '</div>
            </div>
            <div class="setting styleme">
                <div class="setting-label">' . __('Flash Gallery Skin', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-skin_flash">
                    <option>custom</option>
                </select>
                <div class="sidenote">'.__('Skin Custom can be modified via Designer Center.', 'dzsvg') . '</div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Navigation Style', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-nav_type">
                    <option>thumbs</option>
                </select>
                <div class="sidenote">'.__('Choose a navigation style for the normal display mode.', 'dzsvg') . '</div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Menu Position', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-menuposition">
                    <option>none</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Autoplay', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-autoplay">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Autoplay Next', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-autoplaynext">
                    <option value="on">' . __('on', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Cue First Video', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-cueFirstVideo">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
                <div class="sidenote">'.__('Choose if the video should load at start or it should activate on click ( if a <strong>Cover Image</strong> is set ).', 'dzsvg') . '</div>
    
            </div>
            <div class="setting">
                <div class="setting_label">' . __('Cover Image', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-coverImage" value="http://edutasc.com/wp-content/uploads/2013/08/PlayButton.png"/>' . $uploadbtnstring . '
                    <div class="sidenote">A image that appears while the video is cued / not played</div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Default Gallery', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-defaultvg">
                    <option>html5</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Disable Non-Default', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-disableNonDefault">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Randomize / Shuffle Elements', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-randomize">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Enable Switch Button', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-enableswitch">
                    <option value="on">' . __('on', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('HTML5 Gallery Inits on', 'dzsvg') . '
                    <div class="info-con">
                    <div class="info-icon"></div>
                    <div class="sidenote">' . __('Select window.load if you want the slider to init when all the images are loaded, or the other when the document is ready', 'dzsvg') . '</div>
                </div></div>
                <select class="textinput mainsetting styleme" name="0-settings-jqcall">
                <option>window.load</option>
                </select>
            </div>
            <div class="setting">
                <div class="setting-label">' . __('Background', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting with_colorpicker" name="0-settings-bgcolor" value="#111111"/><div class="picker-con"><div class="the-icon"></div><div class="picker"></div></div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Enable Shadow', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-shadow">
                    <option value="on">' . __('on', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting">
                <div class="setting_label">' . __('Logo', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-logo" value="http://edutasc.com/wp-content/uploads/2013/07/EduTasc-Logo.png"/>' . $uploadbtnstring . '
            </div>
            <div class="setting">
                <div class="setting_label">' . __('Logo Link', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-logoLink" value=""/>
            </div>
    
            <div class="setting type_all">
                <div class="setting-label">' . __('Share Button', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-sharebutton">
                    <option value="off">' . __('off', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting_label">' . __('Facebook Link', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-facebooklink" value=""/>
            </div>
            <div class="setting type_all">
                <div class="setting_label">' . __('Twitter Link', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-twitterlink" value=""/>
            </div>
            <div class="setting type_all">
                <div class="setting_label">' . __('Google Plus Link', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-googlepluslink" value=""/>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Embed Button', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-embedbutton">
                    <option value="on">' . __('on', 'dzsvg') . '</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Video Player Configuration', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-vpconfig">
                    '.$vpconfigsstr.'
                </select>
                <div class="sidenote" style="">'.__('setup these inside the <strong>Video Player Configs</strong> admin', 'dzsvg') . '</div>
            </div>
            <hr/>
    
    <div class="dzstoggle toggle1" rel="">
    <div class="toggle-title" style="">' . __('Design Options', 'dzsvg') . '</div>
    <div class="toggle-content">
            <div class="sidenote" style="font-size:14px;">'.__('Only for the html5 gallery', 'dzsvg') . '</div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Design Menu Item Width', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-html5designmiw" value="275"/>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Design Menu Item Height', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-html5designmih" value="76"/>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Design Menu Item Space', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-html5designmis" value="0"/>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Disable Menu Title', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-disable_title">
                    <option>off</option>
                    <option>on</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Disable Menu Description', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-disable_menu_description">
                    <option>off</option>
                    <option>on</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Transition', 'dzsvg') . '</div>
                <select class="textinput mainsetting styleme" name="0-settings-html5transition">
                    <option>slideup</option>
                    <option>fade</option>
                </select>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Container Width', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-outerwidth" value="0"/>
                <div class="sidenote">'.__('Width in pixels. Leave 0 for auto', 'dzsvg').'</div>
            </div>
            <div class="setting type_all">
                <div class="setting-label">' . __('Container Height', 'dzsvg') . '</div>
                <input type="text" class="textinput mainsetting" name="0-settings-outerheight" value="0"/>
                <div class="sidenote">'.__('Height in pixels. Leave 0 for auto', 'dzsvg').'</div>
            </div>
    </div>
    </div>

    <------------------------------------------------------------------------------------------------------------------------------------------------------>'